When i try to save my model as hdf5
path = 'path.h5'
model.save(path)
then load the model again
my_reloaded_model = tf.keras.models.load_model(path)
I get the following error
ValueError: Unknown layer: KerasLayer
Any help ? I'm using
tensorflow version: 2.2.0
keras version: 2.3.0-tf
I just found a solution that worked for me
my_reloaded_model = tf.keras.models.load_model(
(path),
custom_objects={'KerasLayer':hub.KerasLayer}
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With