Skip to content

Commit

Permalink
Gracefully handle legacy Sequential configs (#11280)
Browse files Browse the repository at this point in the history
* Graciously handle legacy Sequential configs

* Remove warning
  • Loading branch information
GabrielBianconi authored and fchollet committed Oct 2, 2018
1 parent 2223143 commit b80f3bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions keras/engine/sequential.py
Expand Up @@ -291,6 +291,9 @@ def from_config(cls, config, custom_objects=None):
name = config['name']
build_input_shape = config.get('build_input_shape')
layer_configs = config['layers']
else: # legacy config file
name = build_input_shape = None
layer_configs = config
model = cls(name=name)
for conf in layer_configs:
layer = layer_module.deserialize(conf,
Expand Down

0 comments on commit b80f3bd

Please sign in to comment.