Bilinear-CNN-TensorFlow icon indicating copy to clipboard operation
Bilinear-CNN-TensorFlow copied to clipboard

BCNN loss increases and accuracy dips badly when finetuning the complete model

Open aniket03 opened this issue 6 years ago • 2 comments

@abhaydoke09 I have been trying to use BCNN model for a different dataset.

When I used BCNN and only fine tuned the last fc layer then the loss was decreasing and after 20 epochs validation acc was also equal to 80%. But when I fine tune the complete model the accuracy drops sharply and loss increases.

So would you suggest only finetuning some layers of BCNN?

For stage 1 fine-tuning: lr = 0.9 momentum = 0.9

For stage 2 fine tuning: lr = 0.001 momentum = 0.9

I have also tried using 1e-4 and 1e-5 here but did not find any solution

Also PS I have a small dataset of nearly 4000 images and I use image data augmentation to take that to 6500 train images.

aniket03 avatar Oct 05 '17 11:10 aniket03

Did you check for gradient flow. It might happen that your gradients are overflowing. Clipping the gradients might help you.

abhaydoke09 avatar Nov 29 '17 05:11 abhaydoke09

hello, I still have a problem. After running the second part of the whole model, I will finish training. It seems that the final model is not saved in the code. Why is this done in the absence of the training model? Can you give me some details?

JUSTDODoDo avatar Oct 28 '18 10:10 JUSTDODoDo