Skip to main content
MPero.1
Visitor II
August 3, 2020
Question

Model saved with Keras 2.4.0 but <= 2.3.1 is supported

  • August 3, 2020
  • 1 reply
  • 1572 views

I receive the following error when I try to load a model I created with Keras: INVALID MODEL: Couldn't load Keras model, error: Model saved with Keras 2.4.0 but <= 2.3.1 is supported

As you can see in attached screenshot I'm working with a python virtual environment where I installed Keras 2.3.0, so I am not able to figure out where the problem is. Thanks for the help !

This topic has been closed for replies.

1 reply

Jacob1
Visitor II
October 5, 2020

I am guessing a bit here, but I think, if you installed TensorFlow and used Keras from the TensorFlow backend (via tensorflow.keras i.e.) python does not use the installed Keras version, but the one TensorFlow is using. And in Your TensorFlow version that would be the Keras version 2.4.0.

https://www.tensorflow.org/api_docs/python/tf/keras

I shipped around this problem by using the older TensorFlow version 1.14. It could be, that the 2.0 version also has an older Keras, I am not sure about that.

You can check the Keras Version used by TensorFlow by importing tensorflow and the command print(tensorflow.keras.__version__)