A series of Jupyter notebooks that walk you through the fundamentals of Machine Learning and Deep Learning in Python using Scikit-Learn, Keras and TensorFlow 2.
Apache License 2.0
27.25k
stars
12.59k
forks
source link
[BUG] Chapter 12: Loading model is failed when using the custom regularisers, activation, etc #634
Describe the bug
In chapter 12, when working with the custom models, the Keras fails loading the model after saving. It is saved safely (not pure safely as it throws warning indicating the save format should be converted to Keras rather than h5) and after loading it throws an exceptions.
Describe the bug In chapter 12, when working with the custom models, the Keras fails loading the model after saving. It is saved safely (not pure safely as it throws warning indicating the save format should be converted to Keras rather than h5) and after loading it throws an exceptions.
notebook name: 12_custom_models_and_training_with_tensorflow.ipynb cell numbers: 91
To Reproduce Please copy the code that fails here, using code blocks like this:
model = keras.models.load_model( "my_model_with_many_custom_parts.h5", custom_objects={ "my_l1_regularizer": my_l1_regularizer, "my_positive_weights": my_positive_weights, "my_glorot_initializer": my_glorot_initializer, "my_softplus": my_softplus, })
And if you got an exception, please copy the full stacktrace here:
Expected behavior A clear and concise description of what you expected to happen.
I expect to load model without any error.
Versions (please complete the following information): I have run it on google colab