Error occurred while loading a pre-trained model of h5 format

1.5k Views Asked by At

I have a problem loading a pre-trained model written as an .h5 file in my TensorFlow-GPU environment. (LINK to the model associated as its weights)

To begin, I loaded this very model by means of keras.models.load_model(). An error popped up as illustrated in the following figure. enter image description here

Then I used tensorflow.keras.models.load_model() instead. Still, I had the same problem, failing to load this model to my program. enter image description here

Environment:

  • TensorFlow-GPU: version 2.3.1
  • Keras: version 2.4.3
  • Python: version 3.8.5
  • IDE: Visual Studio 2019

Any idea would be appreciated. Thanks a lot!

0

There are 0 best solutions below