a-PyTorch-Tutorial-to-Image-Captioning icon indicating copy to clipboard operation
a-PyTorch-Tutorial-to-Image-Captioning copied to clipboard

Indexerror from caption.py

Open kamtafw opened this issue 3 years ago • 1 comments

https://github.com/sgrvinod/a-PyTorch-Tutorial-to-Image-Captioning/blob/cc9c7e2f4017938d414178d3781fed8dbe442852/caption.py#L107

prev_word_inds returns a float. I really don't understand why the division there. Someone should please help me out. Thanks.

kamtafw avatar Apr 11 '22 20:04 kamtafw

https://github.com/sgrvinod/a-PyTorch-Tutorial-to-Image-Captioning/blob/cc9c7e2f4017938d414178d3781fed8dbe442852/caption.py#L107

prev_word_inds returns a float. I really don't understand why the division there. Someone should please help me out. Thanks.

Hello!you could change '/' to '//',The result should be int

dcdc2260 avatar Apr 21 '22 12:04 dcdc2260