You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Built the model successfully! Traceback (most recent call last): File "/home/abhi/Land-Cover-Semantic-Segmentation-PyTorch-main/src/train.py", line 173, in <module> raise e File "/home/abhi/Land-Cover-Semantic-Segmentation-PyTorch-main/src/train.py", line 167, in <module> train_loader = DataLoader(train_dataset, batch_size=batch_size, shuffle=True) File "/home/abhi/.conda/envs/python-ml/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 351, in __init__ sampler = RandomSampler(dataset, generator=generator) # type: ignore[arg-type] File "/home/abhi/.conda/envs/python-ml/lib/python3.9/site-packages/torch/utils/data/sampler.py", line 107, 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
The text was updated successfully, but these errors were encountered:
If you check the logs, there should be "Failed to initialize training and validation datasets and dataloaders!" at the last, which indicates there indeed is some issue with the train and test data path specifically.
The end part of the above error you pasted also denotes "num_samples=0" which means even if the data path is correct, there just might not be any images/files inside the train and test data folders.
Did you run this with your own dataset or the sample one I've provided in the repo as an example? If you're getting this error for your own dataset, can you please check once if it runs fine without making any changes to a freshly cloned project?
thanks turns out it was a small mistake by my parts but small question why is it talking more time to divide patches for me (7053/7053) patches for you it was just (144/144) why is that ?
Built the model successfully! Traceback (most recent call last): File "/home/abhi/Land-Cover-Semantic-Segmentation-PyTorch-main/src/train.py", line 173, in <module> raise e File "/home/abhi/Land-Cover-Semantic-Segmentation-PyTorch-main/src/train.py", line 167, in <module> train_loader = DataLoader(train_dataset, batch_size=batch_size, shuffle=True) File "/home/abhi/.conda/envs/python-ml/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 351, in __init__ sampler = RandomSampler(dataset, generator=generator) # type: ignore[arg-type] File "/home/abhi/.conda/envs/python-ml/lib/python3.9/site-packages/torch/utils/data/sampler.py", line 107, 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
The text was updated successfully, but these errors were encountered: