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
I use the given data generation code to generate the corresponding. h5 file for 291 images, but running main_ vdsr.py ,the following errors will be reported,
===> Loading datasets
Traceback (most recent call last):
File "main_vdsr.py", line 138, in
main()
File "main_vdsr.py", line 54, in main
training_data_loader = DataLoader(dataset=train_set, num_workers=opt.threads, batch_size=opt.batchSize, shuffle=True)
File "/root/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 213, in init
sampler = RandomSampler(dataset)
File "/root/anaconda3/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 92, in init
if not isinstance(self.num_samples, int) or self.num_samples <= 0:
File "/root/anaconda3/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 100, in num_samples
return len(self.data_source)
File "/home/thw/Desktop/Cg/VDSR/pytorch-vdsr-master/dataset.py", line 16, in len
return self.data.shape[0]
AttributeError: 'NoneType' object has no attribute 'shape'
I confirm that my training data is generated according to the code for data generation. What is the reason?
The text was updated successfully, but these errors were encountered:
Hi, dear Jiu, thank you for sharing the code.
I use the given data generation code to generate the corresponding. h5 file for 291 images, but running main_ vdsr.py ,the following errors will be reported,
===> Loading datasets
Traceback (most recent call last):
File "main_vdsr.py", line 138, in
main()
File "main_vdsr.py", line 54, in main
training_data_loader = DataLoader(dataset=train_set, num_workers=opt.threads, batch_size=opt.batchSize, shuffle=True)
File "/root/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 213, in init
sampler = RandomSampler(dataset)
File "/root/anaconda3/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 92, in init
if not isinstance(self.num_samples, int) or self.num_samples <= 0:
File "/root/anaconda3/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 100, in num_samples
return len(self.data_source)
File "/home/thw/Desktop/Cg/VDSR/pytorch-vdsr-master/dataset.py", line 16, in len
return self.data.shape[0]
AttributeError: 'NoneType' object has no attribute 'shape'
I confirm that my training data is generated according to the code for data generation. What is the reason?
The text was updated successfully, but these errors were encountered: