Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xiaojinyu98 opened this issue Feb 14, 2024 · 0 comments

Comments

@xiaojinyu98
Copy link

2024-02-14 16:43:21,698 fcos_core.data.build WARNING: When using more than one image per GPU you may encounter an out-of-memory (OOM) error if your GPU does not have sufficient memory. If this happens, you can reduce SOLVER.IMS_PER_BATCH (for training) or TEST.IMS_PER_BATCH (for inference). For training, you must also adjust the learning rate and schedule length according to the linear scaling rule. See for example: https://github.com/facebookresearch/Detectron/blob/master/configs/getting_started/tutorial_1gpu_e2e_faster_rcnn_R-50-FPN.yaml#L14
loading annotations into memory...
Done (t=0.03s)
creating index...
index created!
loading annotations into memory...
Done (t=0.00s)
creating index...
index created!
Traceback (most recent call last):
File "tools/train_net.py", line 180, in
main()
File "tools/train_net.py", line 173, in main
model = train(cfg, args.local_rank, args.distributed)
File "tools/train_net.py", line 66, in train
start_iter=arguments["iteration"],
File "/hy-tmp/FCOS/FCOS/fcos_core/data/build.py", line 159, in make_data_loader
sampler = make_data_sampler(dataset, shuffle, is_distributed)
File "/hy-tmp/FCOS/FCOS/fcos_core/data/build.py", line 63, in make_data_sampler
sampler = torch.utils.data.sampler.RandomSampler(dataset)
File "/usr/local/lib/python3.6/dist-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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant