image-captioning icon indicating copy to clipboard operation
image-captioning copied to clipboard

Question about decoders.py

Open yongsongH opened this issue 5 years ago • 0 comments

Hi@daveredrum

First of all, thank you for your great work

When I finish Step.2: Extract image features and try to move to Step.3: Training the model, there are some issue with the result. decoders.py 75 searched = deque([([start_words[i].view(1)], start_scores[i].view(1), states) for i in range(beam_size)]) IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number

This looks like an issue with the PyTorch versioning, but I am not sure. Do you have any idea with this? I am looking forward to hearing from you. :)

Best regards

yongsongH avatar Dec 17 '19 11:12 yongsongH