I am working on a github code and there is a pre-trained Keras model saved as h5 file. On loading the file I get an error which is due to version mismatch i.e. the version of Keras while training is different from the version I am using to load it.
from keras.models import load_model
try:
model = load_model('data/cnn_model_preTrained.h5')
except IOError:
print("model file doesn't exit")
It results into this error:
Traceback (most recent call last):
File "C:\Python37\lib\site-packages\keras\models.py", line 1211, in from_config
if 'class_name' not in config[0] or config[0]['class_name'] == 'Merge':
KeyError: 0
The problem is that the version of Keras used while training is not known to me, thus I am unable to solve the version mismatch issue. Is there a way to solve this?