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
Sorry to bother you again, but I encountered an error loading the data:
Loading a dataset...
Traceback (most recent call last):
File "train_text_embedding.py", line 106, in
img = img[indices, ...]
File "/home/tjl/anaconda3/envs/tjl/lib/python3.6/site-packages/torch/autograd/variable.py", line 76, in getitem
return Index.apply(self, key)
File "/home/tjl/anaconda3/envs/tjl/lib/python3.6/site-packages/torch/autograd/_functions/tensor.py", line 16, in forward
result = i.index(ctx.index)
IndexError: When performing advanced indexing the indexing objects must be LongTensors or convertible to LongTensors
My pytorch version is 0.2.0 and other environments have been configured. I hope you can give me some Suggestions on how to deal with this problem!
The text was updated successfully, but these errors were encountered:
@tangjialiang-jj It seems that the type of the variable indices is not a Long type tensor. I have no idea why it does not work on your environment, but what I can tell is that the purpose of the line 106 is to sort the img tensor along the batch dimension according to indices.
Sorry to bother you again, but I encountered an error loading the data:
Loading a dataset...
Traceback (most recent call last):
File "train_text_embedding.py", line 106, in
img = img[indices, ...]
File "/home/tjl/anaconda3/envs/tjl/lib/python3.6/site-packages/torch/autograd/variable.py", line 76, in getitem
return Index.apply(self, key)
File "/home/tjl/anaconda3/envs/tjl/lib/python3.6/site-packages/torch/autograd/_functions/tensor.py", line 16, in forward
result = i.index(ctx.index)
IndexError: When performing advanced indexing the indexing objects must be LongTensors or convertible to LongTensors
My pytorch version is 0.2.0 and other environments have been configured. I hope you can give me some Suggestions on how to deal with this problem!
The text was updated successfully, but these errors were encountered: