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've been struggling too much days with this error, maybe it's really simple but i can't figure out the reason yet. The error is the following:
Traceback (most recent call last):
File "main.py", line 205, in
main(parse_arguments(sys.argv[1:]))
File "main.py", line 169, in main
src_train_dataloader, tgt_train_dataloader, optimizer, epoch)
File "/Volumes/Elements/DANN/pytorch_DANN-master/train/train.py", line 36, in train
for batch_idx, (sdata, tdata) in enumerate(zip(source_dataloader, target_dataloader)):
File "/Volumes/Elements/Apps/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 615, in next
batch = self.collate_fn([self.dataset[i] for i in indices])
File "/Volumes/Elements/Apps/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 615, in
batch = self.collate_fn([self.dataset[i] for i in indices])
File "/Volumes/Elements/Apps/anaconda3/lib/python3.7/site-packages/torchvision/datasets/mnist.py", line 95, in getitem
img = self.transform(img)
File "/Volumes/Elements/Apps/anaconda3/lib/python3.7/site-packages/torchvision/transforms/transforms.py", line 60, in call
img = t(img)
File "/Volumes/Elements/Apps/anaconda3/lib/python3.7/site-packages/torchvision/transforms/transforms.py", line 163, in call
return F.normalize(tensor, self.mean, self.std, self.inplace)
File "/Volumes/Elements/Apps/anaconda3/lib/python3.7/site-packages/torchvision/transforms/functional.py", line 208, in normalize
tensor.sub_(mean[:, None, None]).div_(std[:, None, None])
IndexError: too many indices for tensor of dimension 0
I'd appreciate a lot your help.
The text was updated successfully, but these errors were encountered:
I've been struggling too much days with this error, maybe it's really simple but i can't figure out the reason yet. The error is the following:
Traceback (most recent call last):
File "main.py", line 205, in
main(parse_arguments(sys.argv[1:]))
File "main.py", line 169, in main
src_train_dataloader, tgt_train_dataloader, optimizer, epoch)
File "/Volumes/Elements/DANN/pytorch_DANN-master/train/train.py", line 36, in train
for batch_idx, (sdata, tdata) in enumerate(zip(source_dataloader, target_dataloader)):
File "/Volumes/Elements/Apps/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 615, in next
batch = self.collate_fn([self.dataset[i] for i in indices])
File "/Volumes/Elements/Apps/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 615, in
batch = self.collate_fn([self.dataset[i] for i in indices])
File "/Volumes/Elements/Apps/anaconda3/lib/python3.7/site-packages/torchvision/datasets/mnist.py", line 95, in getitem
img = self.transform(img)
File "/Volumes/Elements/Apps/anaconda3/lib/python3.7/site-packages/torchvision/transforms/transforms.py", line 60, in call
img = t(img)
File "/Volumes/Elements/Apps/anaconda3/lib/python3.7/site-packages/torchvision/transforms/transforms.py", line 163, in call
return F.normalize(tensor, self.mean, self.std, self.inplace)
File "/Volumes/Elements/Apps/anaconda3/lib/python3.7/site-packages/torchvision/transforms/functional.py", line 208, in normalize
tensor.sub_(mean[:, None, None]).div_(std[:, None, None])
IndexError: too many indices for tensor of dimension 0
I'd appreciate a lot your help.
The text was updated successfully, but these errors were encountered: