I trained some models in a docker. I am trying to load the models on my host machine but I am unable to do so.
At first I saved the models as .keras files as mentionned on the documentation. When trying to load the model using tf.keras.models.load_model("model.keras")
, I get the following error:
I trained the models again and saved them as .h5 files this time, which led to two different errors depending on the model I was trying to load:
I could not find any information on how to fix these errors, I would love some help!
As pointed out by @Dr.Snoopy in the comments, loading the models with the same tensorflow version (here 2.11.0) solves the problem.