Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError: When performing advanced indexing the indexing objects must be LongTensors or convertible to LongTensors #16

Open
Jayashree-Pougajendy opened this issue Jun 30, 2020 · 0 comments

Comments

@Jayashree-Pougajendy
Copy link

Jayashree-Pougajendy commented Jun 30, 2020

Hi,
I am getting the foll. error on training convcap using torch 0.2.0_3 and torchvision 0.1.9. Kindly suggest how to resolve.
Traceback (most recent call last):
File "main.py", line 89, in
main()
File "main.py", line 72, in main
train(args)
File "/home/js/convcap/train.py", line 126, in train
loss = F.cross_entropy(wordact_t[maskids, ...],
File "/home/js/anaconda3/envs/env_con/lib/python3.5/site-packages/torch/autograd/variable.py", line 76, in getitem
return Index.apply(self, key)
File "/home/js/anaconda3/envs/env_con/lib/python3.5/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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant