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 133 forks source link

Inconsistent dimensions in VQA json model #8

Closed anujkhare closed 8 years ago

anujkhare commented 8 years ago

Hi, thanks for the repo!

In the function get_question_features: Ipython notebook uses np array of size (1, len(tokens), 300 for the question_tensor, while demo.py uses (1, 30, 300). The json model also uses the latter.

Ipython notebook produces an error at this function.

iamaaditya commented 8 years ago

When Keras updated from 0.3 to 1.0, it changed quite a few things, and thus I had to change the code. I only changed demo.py. So use only that. If you look closely the IPython Notebook is just the same functions but with more interactive examples. You can literally copy paste demo.py to notebook file and break the functions and execute the code.

anujkhare commented 8 years ago

Thanks, I got it to work. Maybe add a small note in readme?

iamaaditya commented 8 years ago

Sure. Will do, thanks. Close #8