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 got this error, and can't get why it is happening.
Traceback (most recent call last):
File "train.py", line 65, in
dataset = dataloader(opt)
File "/root/gans_depth/Synthetic2Realistic/dataloader/data_loader.py", line 130, in dataloader
dataset = nc.SafeDataLoader(datasets, batch_size=opt.batchSize, shuffle=opt.shuffle, num_workers=int(opt.nThreads))
File "/root/anaconda3/lib/python3.7/site-packages/nonechucks/dataloader.py", line 25, in call
obj = type.call(cls, *args, **kwargs)
File "/root/anaconda3/lib/python3.7/site-packages/nonechucks/dataloader.py", line 141, in init
self.dataset = _OriginalDataset(self.safe_dataset)
File "/root/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 271, in setattr
'initialized'.format(attr, self.class.name))
ValueError: dataset attribute should not be set after SafeDataLoader is initialized
Hi!
I got this error, and can't get why it is happening.
Traceback (most recent call last):
File "train.py", line 65, in
dataset = dataloader(opt)
File "/root/gans_depth/Synthetic2Realistic/dataloader/data_loader.py", line 130, in dataloader
dataset = nc.SafeDataLoader(datasets, batch_size=opt.batchSize, shuffle=opt.shuffle, num_workers=int(opt.nThreads))
File "/root/anaconda3/lib/python3.7/site-packages/nonechucks/dataloader.py", line 25, in call
obj = type.call(cls, *args, **kwargs)
File "/root/anaconda3/lib/python3.7/site-packages/nonechucks/dataloader.py", line 141, in init
self.dataset = _OriginalDataset(self.safe_dataset)
File "/root/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 271, in setattr
'initialized'.format(attr, self.class.name))
ValueError: dataset attribute should not be set after SafeDataLoader is initialized
My dataset is:
class CreateDataset(data.Dataset):
I call dataloader like this:
def dataloader(opt):
datasets = CreateDataset()
datasets.initialize(opt)
datasets = nc.SafeDataset(datasets)
dataloader = nc.SafeDataLoader(datasets, batch_size=opt.batchSize, shuffle=opt.shuffle, num_workers=int(opt.nThreads))
return dataloader
Thank you in advance!
The text was updated successfully, but these errors were encountered: