Open ChristophNeuner opened 6 years ago
maybe invalid path? check the file, folder name, etc. It should work since model.load_weights is from keras. You can use print function to check step by step what is going on.
I also got this issue and the path is all correct. And I check the result of model.find_last()[1] is correct too.
This issue caused me to train a whole new model every time.
@ChiaoSun did you check the def find_last(self):
in model.py
? Remember to name the folder as config.Name + date +T+time and also name the h5 file as mask_rcnn_bowl_000X.h5
If you still have problem, try to print step by step what is going on inside that function till you find where exactly is the error. I never had problems to load the last training model and continue training it.
@fastlater I check the def find_last(self)
and it return the correct model path (checkpoint\nuclei20180330T0129\mask_rcnn_nuclei_0050.h5). I found model.train may always creates a new checkpoint even I already load weights from the last model. Did I use wrong function(model.train) to continue training model?
It is correct. If you check the loss in tensorboard, you can notice that the loss start from the value obtained in the last checkpoint trained. The script wont continue adding more checkpoints in that previous folder because maybe you would like to start training something new from this point.
@fastlater , I notice that the loss start from the last trained model, thank for your help. And I found if there were not .h5 file in the latest checkpoint folder may cause @ChristophNeuner 's NoneType is not callable problem.
Hello,
I hope you can help me. First I have trained the head layers only. Now I want to use the last saved .h5 file and train all layers with a samller learning rate. But when I change initialize init_with=="last" the training does not work.
Is there something else I have to change?
Thanks in advance!
Christoph
I always get one of these two errors: