Handle None case in deserialization.
@@ -120,6 +120,8 @@ def serialize_keras_object(instance):
def deserialize_keras_object(identifier, module_objects=None,
custom_objects=None,
printable_module_name='object'):
+ if identifier is None:
+ return None
if isinstance(identifier, dict):
# In this case we are dealing with a Keras config dictionary.
config = identifier
