Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added few lines of code in Keras Custom model to fix the error
Added 2 lines of code `import keras`, `@keras.saving.register_keras_serializable()` on top of the Keras Custom model definition because it shows typeerror - "Make sure custom classes are decorated with `@keras.saving.register_keras_serializable()`" after reloading the model when saving as `.keras`. As mentioned in this Saving [Custom objects](https://www.tensorflow.org/guide/keras/serialization_and_saving#custom_objects) definition. Please refer to this replicated working code [gist](https://colab.research.google.com/gist/RenuPatelGoogle/f124503c52144c5ed6e9c79cffcb593d/intro_to_modules.ipynb#scrollTo=hpW-4Dj3Q1Rb) for your reference. Thank you.
- Loading branch information