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

RuntimeError on line 113 #13

Open
MarkNo1 opened this issue Jan 24, 2018 · 1 comment
Open

RuntimeError on line 113 #13

MarkNo1 opened this issue Jan 24, 2018 · 1 comment

Comments

@MarkNo1
Copy link

MarkNo1 commented Jan 24, 2018

Hi, first of all great work, then I found that the line 113 :

y = Variable(torch.sparse.torch.eye(NUM_CLASSES)).cuda().index_select(dim=0, index=max_length_indices.data)

produce:
RuntimeError: index_select(): argument 'index' must be Variable, not torch.cuda.LongTensor

I resolve this issue removing the '.data' from the 'max_length_indices'.

Torch Version: 0.4.0a0+96ceb91

Regards

@unsuthee
Copy link

unsuthee commented Mar 3, 2018

I have experienced the same runtime error. I want to confirm that the above workaround fixes the error.

I use pyTorch 0.3.1.post2

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

2 participants