Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyword argument not understood: truncate_gradient #21

Open
skeeph opened this issue Mar 11, 2016 · 2 comments
Open

Keyword argument not understood: truncate_gradient #21

skeeph opened this issue Mar 11, 2016 · 2 comments

Comments

@skeeph
Copy link

skeeph commented Mar 11, 2016

I performed installation as it said in tutorial, succesfully run trainMLP.py
But when i try to run demo_batch.py I get error
File "demo_batch.py", line 71, in <module> main() File "demo_batch.py", line 34, in main model = model_from_json(open(args.model).read()) File "/home/deep/temp/vqa_web_demo/vqa/local/lib/python2.7/site-packages/keras/models.py", line 166, in model_from_json return model_from_config(config, custom_objects=custom_objects) File "/home/deep/temp/vqa_web_demo/vqa/local/lib/python2.7/site-packages/keras/models.py", line 177, in model_from_config model = container_from_config(config, custom_objects=custom_objects) File "/home/deep/temp/vqa_web_demo/vqa/local/lib/python2.7/site-packages/keras/utils/layer_utils.py", line 44, in container_from_config init_layer = container_from_config(layer) File "/home/deep/temp/vqa_web_demo/vqa/local/lib/python2.7/site-packages/keras/utils/layer_utils.py", line 35, in container_from_config init_layer = container_from_config(layer) File "/home/deep/temp/vqa_web_demo/vqa/local/lib/python2.7/site-packages/keras/utils/layer_utils.py", line 44, in container_from_config init_layer = container_from_config(layer) File "/home/deep/temp/vqa_web_demo/vqa/local/lib/python2.7/site-packages/keras/utils/layer_utils.py", line 102, in container_from_config base_layer = get_layer(name, layer_dict) File "/home/deep/temp/vqa_web_demo/vqa/local/lib/python2.7/site-packages/keras/utils/layer_utils.py", line 168, in get_layer instantiate=True, kwargs=kwargs) File "/home/deep/temp/vqa_web_demo/vqa/local/lib/python2.7/site-packages/keras/utils/generic_utils.py", line 18, in get_from_module return res(**kwargs) File "/home/deep/temp/vqa_web_demo/vqa/local/lib/python2.7/site-packages/keras/layers/recurrent.py", line 559, in __init__ super(LSTM, self).__init__(**kwargs) File "/home/deep/temp/vqa_web_demo/vqa/local/lib/python2.7/site-packages/keras/layers/recurrent.py", line 132, in __init__ super(Recurrent, self).__init__(**kwargs) File "/home/deep/temp/vqa_web_demo/vqa/local/lib/python2.7/site-packages/keras/layers/core.py", line 47, in __init__ assert kwarg in allowed_kwargs, 'Keyword argument not understood: ' + kwarg AssertionError: Keyword argument not understood: truncate_gradient

Why this error happen and how can i fix it? Thanks

@infinity0a
Copy link

I got this error, too...hope to know how you fix it

@iamaaditya
Copy link

This is because the pre-trained model already existing in the repo was trained on the older version of Keras.
It is best to train your model, however to save computation if you would like to use pretrained model and weights, you may download them here
https://github.com/iamaaditya/visual-qa/tree/master/models
These were trained on new version of Keras, and works with demo_batch.py

iamaaditya added a commit to iamaaditya/visual-qa that referenced this issue Mar 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants