Skip to content

ValueError: num_samples should be a positive integer value, but got num_samples=0 #12

@hugoycj

Description

@hugoycj

Hello!

I am trying to train RP-R-CNN, but I encounter a problem when runing the training command following the Readme.md. When running

CUDA_VISIBLE_DEVICES=0 python tools/train_net.py --cfg cfgs/CIHP/e2e_rp_rcnn_R-50-FPN_3x_ms.yaml

I am getting the following message:

Traceback (most recent call last):
  File "tools/train_net.py", line 147, in <module>
    main()
  File "tools/train_net.py", line 127, in main
    train_loader = make_train_data_loader(datasets, is_distributed=args.distributed, start_iter=scheduler.iteration)
  File "/data/home/v_julhugoye/human_parsing/RP-R-CNN/rcnn/datasets/dataset.py", line 121, in make_train_data_loader
    sampler = make_data_sampler(datasets, shuffle, is_distributed)
  File "/data/home/v_julhugoye/human_parsing/RP-R-CNN/rcnn/datasets/dataset.py", line 66, in make_data_sampler
    sampler = torch.utils.data.sampler.RandomSampler(dataset)
  File "/data/home/v_julhugoye/.conda/envs/ParsingRCNN/lib/python3.6/site-packages/torch/utils/data/sampler.py", line 94, in __init__
    "value, but got num_samples={}".format(self.num_samples))
ValueError: num_samples should be a positive integer value, but got num_samples=0
Segmentation fault

So thanks for your help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions