RockyXu66 / Faster_RCNN_for_Open_Images_Dataset_Keras

Faster R-CNN for Open Images Dataset by Keras
474 stars 340 forks source link

Weights not loading properly #92

Closed dokeefemain closed 2 years ago

dokeefemain commented 2 years ago

Currently trying to implement Faster RCNN Inception Resnet V2 using this. After a lot of work I have gotten the model to train. The only issue is that it refuses to use the weights that I have saved. I think there are a couple causes to this. Firstly model_all.save_weights(C.model_path) is used to save weights. The only time model_all gets used in the entire file is when it is compiled and when you save weights so I have no idea how it could possibly be updating it's weights during training. Secondly I think there might be some errors related to using by_name=True when you try to reload the weights. My solution to this is to basically stop using model_all all together and save model_classifier and model_rpn in seperate files. Then load model_classifier and model_rpn without using by_name=True. This whole process is insainly frustrating given that the time for each epoch is around 22 minutes using colab+ so if anyone has some suggestions for me that would be greatly appreciated.

dokeefemain commented 2 years ago

I reset my training data every time I reloaded the weights SO, as you could imagine, it looked like my weights where just resetting.