with open(\'2model.json\',\'r\') as f:
json = f.read()
model = model_from_json(json)
model.load_weights(\"color_tensorflow_real_mode.h5\")
I traine
Make sure you have the newest version of Keras
and tensorflow
(which are 2.4.4
and 1.11.0
) by running either pip install keras tensorflow
or conda install keras tensorflow
.
In case it is Google Colab that uses deprecated objects, you may need to use custom objects:
from keras.utils import CustomObjectScope
from keras.initializers import glorot_uniform
with CustomObjectScope({'GlorotUniform': glorot_uniform()}):
model = load_model('my_model.h5')
Not sure if this is your case though.