okankop / Efficient-3DCNNs

PyTorch Implementation of "Resource Efficient 3D Convolutional Neural Networks", codes and pretrained models.
MIT License
777 stars 151 forks source link

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

Closed YB221 closed 4 years ago

YB221 commented 4 years ago

dataset loading [0/4795] dataset loading [1000/4795] dataset loading [2000/4795] dataset loading [3000/4795] dataset loading [4000/4795] Traceback (most recent call last): File "main.py", line 95, in pin_memory=True) File "/home/yashbhambhu_18je0949/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 213, in init sampler = RandomSampler(dataset) File "/home/yashbhambhu_18je0949/.local/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

Please help!

YB221 commented 4 years ago

It was my bad. The solution is to arrange your data set in "/folder/classname/videoname/*.jpg" format otherwise it won't load hence num_samples will remain 0. Hope this helps.

ArnabSen123 commented 1 month ago

Can you me how exactly have you solved this problem in details?