-
Notifications
You must be signed in to change notification settings - Fork 25
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 integeral value, but got num_samples=0 #10
Comments
Change "from datasets_USR import ImageDataset" to "from datasets_ISTD import ImageDataset" in "train_Mask-ShadowGAN" and have a try again. |
Hello,I encountered the same problem, and I also tried to use the above method(Change "from datasets_USR import ImageDataset" to "from datasets_ISTD import ImageDataset" in "train_Mask-ShadowGAN" and have a try again.). But it won't work.Is there any other way? |
|
Oh,Oh.Thank for your guidance. I don't have a Linux system, so I don't know. I'll get a Linux system first and then run it. |
I run train_Mask-ShadowGAN.py and have errors as following:
Traceback (most recent call last):
File "train_Mask-ShadowGAN.py", line 140, in
batch_size=opt.batchSize, shuffle=True, num_workers=opt.n_cpu)
File "F:\python3.5\lib\site-packages\torch\utils\data\dataloader.py", line 802, in init
sampler = RandomSampler(dataset)
File "F:\python3.5\lib\site-packages\torch\utils\data\sampler.py", line 64, in init
"value, but got num_samples={}".format(self.num_samples))
ValueError: num_samples should be a positive integeral value, but got num_samples=0
I don't know where to modify the dataset path or why len(self.data_ info)= =0.Can you give me some advice?
Thanks.
The text was updated successfully, but these errors were encountered: