iamaaditya / VQA_Demo

Visual Question Answering Demo on pretrained model
http://iamaaditya.github.io/2016/04/visual_question_answering_demo_notebook
MIT License
242 stars 134 forks source link

get image features / 'int' object has no attribute 'predict' #13

Closed michael20at closed 6 years ago

michael20at commented 6 years ago

Hi,

solved my last issue, but now I'm stuck at "get image features":

AttributeError Traceback (most recent call last)

in () 1 # get the image features ----> 2 image_features = get_image_features(image_file_name, CNN_weights_file_name) in get_image_features(image_file_name, CNN_weights_file_name) 16 im = np.expand_dims(im, axis=0) 17 ---> 18 image_features[0,:] = get_image_model(CNN_weights_file_name).predict(im)[0] 19 return image_features AttributeError: 'int' object has no attribute 'predict' Any idea? Thank you, Mike