Open MarkNo1 opened 6 years ago
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
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
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