Show-Attend-and-Tell icon indicating copy to clipboard operation
Show-Attend-and-Tell copied to clipboard

Question about Generate Captions

Open yongsongH opened this issue 5 years ago • 2 comments

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 <PATH_TO_IMG> and <PATH_TO_MODEL_PARAMETERS> 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.

yongsongH avatar Dec 16 '19 02:12 yongsongH

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.

AaronCCWong avatar Dec 16 '19 18:12 AaronCCWong

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.

yongsongH avatar Dec 17 '19 01:12 yongsongH