Closed varungupta31 closed 2 years ago
self.model.save(self.checkpoints_path+'Model_'+str(epoch))
This line is not used to save model
The author uses ModelCheckpoint()
to save Model,which in line 184 to /image-segmentation-keras/keras_segmentation/train.py
I set the checkpoint parameter as --checkpoints_path="checkpoint", It can save the checkpoint file in the root directory, maybe you can try.
You might need to make a concrete tensor-flow function and save that. Else currently this codebase only saves the weights and to use the model create the model object and call load_weights.
I'm using
TF 2.3.0
(as I don't have a CUDA 11 GPU), and training thefcn_32_vgg
model, using the script:During training, I get the following logs:
However, my checkpoint_path contains only two files:
checkpoint
and_config.json
. The checkpoint containswhile the json contains:
{"model_class": "fcn_32_vgg", "n_classes": 2, "input_height": 256, "input_width": 512, "output_height": 288, "output_width": 544}
Where is my saved model / How can I save my trained model for further inferences and GradCam?
I tried changing
/image-segmentation-keras/keras_segmentation/train.py
line 56 toself.model.save(self.checkpoints_path+'Model_'+str(epoch))
But it didn't solve anything. Kindly help me out in saving the model.
@divamgupta