iamaaditya / VQA_Demo

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

unable to load VQA model from json string #2

Closed suraj-deshmukh closed 8 years ago

suraj-deshmukh commented 8 years ago

hi I am unable to load the model from json string. I am using keras 1.0.1 version. I am getting KeyError: class_name

iamaaditya commented 8 years ago

Hi Suraj This was written in Keras 0.3.2 (the previous version). The new version of Keras (1.-+) changed the way it represents a model. This means model built in older versions will not be loadable without some changes.

It seems they might add the legacy support to load old models, see this https://github.com/fchollet/keras/blob/master/keras/models.py#L26

However, I will try to compile the model in newer version, but training will take time. Give me a day or two. In the meantime you could easy have a alternate directory of older version of keras and use that to run this.

iamaaditya commented 8 years ago

@suraj-deshmukh I have pushed the code which should work on Keras 1+