I try to use tf.keras.models.load_model to load saved model in tensorflow 2.3. However, I got the same error in https://github.com/tensorflow/tensorflow/issues/41535
It seems an important function. But this issue is still not solved. Does anyone know if there is any alternative method to implement the same result?
I found an alternative method to load custom model in tensorflow 2.3. You need to do some following changes. I will explain by some code snapshots
for
__init__()
of custom model. Before,After,
define two functions in your custom model class
After finishing training, save model using 'h5' format
Finally, load model as following codes,