ValueError: num_samples should be a positive integer value, but got num_samples=0
See original GitHub issueRUNDIR: runs\seg_pascal\1980 Traceback (most recent call last): File "train.py", line 226, in <module> train(cfg, writer, logger) File "train.py", line 61, in train t_loader, batch_size=cfg["training"]["batch_size"], num_workers=cfg["training"]["n_workers"], shuffle=True File "C:\Users\yp\Anaconda3\lib\site-packages\torch\utils\data\dataloader.py", line 176, in __init__ sampler = RandomSampler(dataset) File "C:\Users\yp\Anaconda3\lib\site-packages\torch\utils\data\sampler.py", line 66, 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
How can I solve this problem?Thank you!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:20 (1 by maintainers)
Top Results From Across the Web
Num_samples should be a positive integer ... - PyTorch Forums
Hello everybody, I am new to PyTorch. I have a problem when I tried to train my data. When I run my program...
Read more >ValueError: num_samples should be a positive integer value ...
I have the error of the title ValueError: num_samples should be a positive integer value, but got num_samples=0 because basically I am ...
Read more >num_samples should be a positive integeral value, but got ...
Has anyone encountered and solved the below error: Error: ValueError: num_samples should be a positive integeral value, but got num_samples= ...
Read more >num_samples should be a positive integer value ... - Medium
iam getting this error while executing this code. “num_samples should be a positive integer value, but got num_samples=0” is published by ...
Read more >brian2hears.filtering.filterbank — brian2hears documentation
__init__`` will set the number of channels equal to the number of source channels, but we ... raise ValueError('All sources must have the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You set the wrong path and model cannot find the training data to start training!
Hi, I checked the input data path and it was correct. But still i’m getting “ValueError: num_samples should be a positive integer value, but got num_samples=0”.
Could some one help or provide any work around.