Skip to content

Conversation

@guilherme-pombo
Copy link

Support for different model structures

# Remove layer class from custom_objects as it's not needed anymore
custom_objects.pop('layer_class', None)
for cls_key in custom_objects:
globals()[cls_key] = custom_objects[cls_key]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried to figure this out but wasn't 100% clear to me... why do we need to dump the custom_objects in the global variable space here?

keras/models.py Outdated
training_config = f.attrs.get('training_config')
if training_config is None:
if training_config is None or ('classify' in custom_objects and custom_objects['classify']):
custom_objects.pop('layer_class', None)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we pop layer_class here?

@kencoken kencoken merged commit d9dfb91 into kencoken:master May 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants