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 #235

Open
zherCyber opened this issue Aug 26, 2021 · 1 comment

Comments

@zherCyber
Copy link

Traceback (most recent call last):
File "D:/PycharmWorkspace/pytorch-tutorial/tutorials/01-basics/pytorch_basics/main.py", line 154, in
train_loader = torch.utils.data.DataLoader(dataset=custom_dataset,
File "D:\anaconda3\envs\torch\lib\site-packages\torch\utils\data\dataloader.py", line 262, in init
sampler = RandomSampler(dataset, generator=generator) # type: ignore
File "D:\anaconda3\envs\torch\lib\site-packages\torch\utils\data\sampler.py", line 103, in init
raise ValueError("num_samples should be a positive integer "
ValueError: num_samples should be a positive integer value, but got num_samples=0

@rollysys
Copy link

Refer to #236

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

2 participants