cancel
Showing results for 
Search instead for 
Did you mean: 

Model saved with Keras 2.4.0 but <= 2.3.1 is supported

MPero.1
Associate

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 !

1 REPLY 1
Jacob1
Associate II

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__)