I have cloned human pose estimation keras model from this link human pose estimation keras
When I try to load the model on google colab, I get the following error
code
from keras.models import load_model
model = load_model('model.h5')
error
ValueError Traceback (most recent call
last)
<ipython-input-29-bdcc7d8d338b> in <module>()
1 from keras.models import load_model
----> 2 model = load_model('model.h5')
/usr/local/lib/python3.6/dist-packages/keras/engine/saving.py in load_model(filepath, custom_objects, compile)
417 f = h5dict(filepath, 'r')
418 try:
--> 419 model = _deserialize_model(f, custom_objects, compile)
420 finally:
421 if opened_new_file:
/usr/local/lib/python3.6/dist-packages/keras/engine/saving.py in _deserialize_model(f, custom_objects, compile)
219 return obj
220
--> 221 model_config = f['model_config']
222 if model_config is None:
223 raise ValueError('No model found in config.')
/usr/local/lib/python3.6/dist-packages/keras/utils/io_utils.py in __getitem__(self, attr)
300 else:
301 if self.read_only:
--> 302 raise ValueError('Cannot create group in read only mode.')
303 val = H5Dict(self.data.create_group(attr))
304 return val
ValueError: Cannot create group in read only mode.
Can someone please help me understand this read-only mode? How do I load this model?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…