AaronCCWong / Show-Attend-and-Tell

A PyTorch implementation of the paper Show, Attend and Tell: Neural Image Caption Generation with Visual Attention
74 stars 27 forks source link

Question about Generate Captions #8

Open yongsongH opened 4 years ago

yongsongH commented 4 years ago

First of all, thank you for your great work

When I finish training and try to generate caption, there are something issue with the result.

AttributeError: 'Tensor' object has no attribute 'ndim'

I add the and to the code. parser.add_argument('--img-path', type=str, help='path to image',default="0077.png") parser.add_argument('--model', type=str, default="model/model_vgg19_10.pth",help='path to model paramters')

Do you have any idea with this? More details I have emailed you by Gmail.

AaronCCWong commented 4 years ago

Hmm, this looks like an issue with the PyTorch versioning. This codebase was tested on 0.4.1 so 1.0.0+ might not work. I would be happy to accept a PR that updates the PyTorch version.

yongsongH commented 4 years ago

Thanks for your answer :)

It is very kind of you to help me. If you updates the PyTorch version, please must be let me know.