-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: Cannot create group in read only mode. #6
Comments
You got any solution for ValueError? I am with same error please help. |
I got any solution for ValueError. self.model =load_model(load_model_resume_training,custom_objects={'gen_dice_loss': gen_dice_loss,'dice_whole_metric':dice_whole_metric,'dice_core_metric':dice_core_metric,'dice_en_metric':dice_en_metric}) change to self.model = self.load_model(load_model_resume_training)
sgd = SGD(lr=0.08, momentum=0.9, decay=5e-6, nesterov=False)
self.model.compile(loss=gen_dice_loss, optimizer=sgd, metrics=[dice_whole_metric,dice_core_metric,dice_en_metric]) |
The load_model function needs '{ }.json', but I didn't find it |
Hello, hope it's not too late. |
Hello, I used your solution(change self.model) and ran into this problem as well:No such file or directory: '*******/pretrained_weights/ResUnet.epoch_02.hdf5.json' |
Using TensorFlow backend.
Traceback (most recent call last):
File "/content/drive/My Drive/Brain-tumor-segmentation-master/train.py", line 108, in
brain_seg = Training(batch_size=4,nb_epoch=3,load_model_resume_training=model_to_load)
File "/content/drive/My Drive/Brain-tumor-segmentation-master/train.py", line 39, in init
self.model =load_model(load_model_resume_training,custom_objects={'gen_dice_loss': gen_dice_loss,'dice_whole_metric':dice_whole_metric,'dice_core_metric':dice_core_metric,'dice_en_metric':dice_en_metric})
File "/usr/local/lib/python3.6/dist-packages/keras/engine/saving.py", line 419, in load_model
model = _deserialize_model(f, custom_objects, compile)
File "/usr/local/lib/python3.6/dist-packages/keras/engine/saving.py", line 221, in _deserialize_model
model_config = f['model_config']
File "/usr/local/lib/python3.6/dist-packages/keras/utils/io_utils.py", line 302, in getitem
raise ValueError('Cannot create group in read only mode.')
ValueError: Cannot create group in read only mode.
while running train.py in colab got this error.
The text was updated successfully, but these errors were encountered: