Skip to content

Commit

Permalink
fix load_model so that it can load customized optimizer (keras-team#4625
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Shaofanl authored and fchollet committed Dec 7, 2016
1 parent ad5e29a commit 1fd2108
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion keras/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def deserialize(obj):
return model
training_config = json.loads(training_config.decode('utf-8'))
optimizer_config = training_config['optimizer_config']
optimizer = optimizer_from_config(optimizer_config)
optimizer = optimizer_from_config(optimizer_config, custom_objects=custom_objects)

# recover loss functions and metrics
loss = deserialize(training_config['loss'])
Expand Down

0 comments on commit 1fd2108

Please sign in to comment.