Brain-tumor-segmentation
Brain-tumor-segmentation copied to clipboard
ValueError: Cannot create group in read only mode.
Using TensorFlow backend.
Traceback (most recent call last):
File "/content/drive/My Drive/Brain-tumor-segmentation-master/train.py", line 108, in
while running train.py in colab got this error.
You got any solution for ValueError? I am with same error please help. Thanks
I got any solution for ValueError.
If you want to train the model from scratch, the parameter load_model_resume_training shoud be None.
If you train the model from the pretrained weights provided by @Issam28, the parameter load_model_resume_training shoud be pretrained weights filepath without extension and code
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])
I got any solution for ValueError. If you want to train the model from scratch, the parameter
load_model_resume_trainingshoud beNone. If you train the model from the pretrained weights provided by @Issam28, the parameterload_model_resume_trainingshoud be pretrained weights filepath without extension and codeself.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
I got any solution for ValueError. If you want to train the model from scratch, the parameter
load_model_resume_trainingshoud beNone. If you train the model from the pretrained weights provided by @Issam28, the parameterload_model_resume_trainingshoud be pretrained weights filepath without extension and codeself.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. The json file can be produced by function save_model in object Train.
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' I don't understand you said "The json file can be produced by function save_model in object Train.", Can you elaborate a bit more on how to solve this problem? Thank you very much! I am looking forward to your reply.