-
Notifications
You must be signed in to change notification settings - Fork 4
Support for different model structures #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
keras/utils/layer_utils.py
Outdated
| # 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] |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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?
Support for different model structures