Loading pretrained model and using predict.py on it
deepankarpal89 opened this issue · 3 comments
I tried to load the pretrained model you have provided and using it to predict on the dev set. I get the following error while loading the model by using keras load_model(model_path). Following is the error
Traceback (most recent call last):
File "predict.py", line 35, in
model = load_model(args.model, custom_objects())
File "/Users/deepankar/anaconda3/envs/squad/lib/python2.7/site-packages/keras/models.py", line 240, in load_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "/Users/deepankar/anaconda3/envs/squad/lib/python2.7/site-packages/keras/models.py", line 314, in model_from_config
return layer_module.deserialize(config, custom_objects=custom_objects)
File "/Users/deepankar/anaconda3/envs/squad/lib/python2.7/site-packages/keras/layers/init.py", line 55, in deserialize
printable_module_name='layer')
File "/Users/deepankar/anaconda3/envs/squad/lib/python2.7/site-packages/keras/utils/generic_utils.py", line 140, in deserialize_keras_object
list(custom_objects.items())))
File "/Users/deepankar/anaconda3/envs/squad/lib/python2.7/site-packages/keras/engine/topology.py", line 2500, in from_config
process_node(layer, node_data)
File "/Users/deepankar/anaconda3/envs/squad/lib/python2.7/site-packages/keras/engine/topology.py", line 2459, in process_node
layer(input_tensors, **kwargs)
File "/Users/deepankar/anaconda3/envs/squad/lib/python2.7/site-packages/keras/layers/recurrent.py", line 514, in call
full_input_spec = self.input_spec + additional_specs
TypeError: unsupported operand type(s) for +: 'NoneType' and 'list'
Sorry for late response,
What Keras version do you use?
Same problem
I am using keras 2.1.5 to use multi gpu model
btw, training is really slow
it takes about 5 hours for each epoch on one 1080ti with 150 batch_size