You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
seq, alphas = caption_image_beam_search(encoder, decoder, args.img, word_map, args.beam_size)
File "D:/2021/sjt/code/a-PyTorch-Tutorial-to-Image-Captioning-master/caption.py", line 113, in caption_image_beam_search
seqs_alpha = torch.cat([seqs_alpha[prev_word_inds.long()], alpha[prev_word_inds].unsqueeze(1)],
IndexError: tensors used as indices must be long, byte or bool tensors
The text was updated successfully, but these errors were encountered:
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
seq, alphas = caption_image_beam_search(encoder, decoder, args.img, word_map, args.beam_size)
File "D:/2021/sjt/code/a-PyTorch-Tutorial-to-Image-Captioning-master/caption.py", line 113, in caption_image_beam_search
seqs_alpha = torch.cat([seqs_alpha[prev_word_inds.long()], alpha[prev_word_inds].unsqueeze(1)],
IndexError: tensors used as indices must be long, byte or bool tensors
The text was updated successfully, but these errors were encountered: