a-PyTorch-Tutorial-to-Image-Captioning
                                
                                 a-PyTorch-Tutorial-to-Image-Captioning copied to clipboard
                                
                                    a-PyTorch-Tutorial-to-Image-Captioning copied to clipboard
                            
                            
                            
                        caption.py:IndexError: tensors used as indices must be long, byte or bool tensors
When I run caption.py,I got the following error:
Traceback (most recent call last):
File "D:/2021/sjt/code/a-PyTorch-Tutorial-to-Image-Captioning-master/caption.py", line 217, in 
I had the same problem
I have the same problem. Have you solved it?
    prev_word_inds = top_k_words / vocab_size
You can try changing the "/" in the above code to "//".
你好,解决了没
我也遇到了同样的问题,请问怎么解决