Make deserialization case-insensitive for built-in optimizers.
@@ -644,6 +644,8 @@ def deserialize(config, custom_objects=None):
'nadam': Nadam,
'tfoptimizer': TFOptimizer,
}
+ # Make deserialization case-insensitive for built-in optimizers.
+ if config['class_name'].lower() in all_classes:
config['class_name'] = config['class_name'].lower()
return deserialize_keras_object(config,
module_objects=all_classes,
