kevinzakka / recurrent-visual-attention

A PyTorch Implementation of "Recurrent Models of Visual Attention"
MIT License
468 stars 123 forks source link

IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number #21

Closed Curry30h closed 4 years ago

Curry30h commented 5 years ago

use pytorch 1.0 python3.7

GilbertZhang commented 5 years ago

same issue here, did you find a solution Mr. Curry?

ifgovh commented 5 years ago

I use Python 3.6.5 and also meet this problem.

ifgovh commented 5 years ago

I found the solution here: https://github.com/pytorch/pytorch/issues/15585#issuecomment-450307685