Closed DavidLandup0 closed 1 year ago
@DavidLandup0 In order to expedite the trouble-shooting process, please provide a code snippet to reproduce the issue reported here. Thank you!
This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Thank you.
Closing as stale. Please reopen if you'd like to work on this further.
System information.
Describe the problem.
When creating custom models with custom layers, to avoid passing
custom_objects
, we can use@keras.utils.register_keras_serializable()
to register custom objects to the global object dictionary. This doesn't seem to work on Functional Subclassing models when loading/deserializing. For example:get_registered_object()
returns a class correctly. When inspecting the custom objects:But, when loading:
An error is thrown:
It works when I pass a custom object:
But this shouldn't be required when an object is registered to be serialized. Am I using the API wrong?
Contributing.
Standalone code to reproduce the issue.
Provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Colab/Jupyter/any notebook.
Source code / logs.
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.