Fine-tuning GoogLeNet

862 views
Skip to first unread message

Steven Clark

unread,
Jun 23, 2015, 2:07:03 PM6/23/15
to caffe...@googlegroups.com
Hi-
 
When fine-tuning the googlenet models, how do you handle the first 2 auxiliary loss classifiers? Do you reduce their learning rates, or delete them entirely?
 
I was fine-tuning for a 3-class classifier, and did the following:
 
in quick_solver.prototxt:
  -  decrease base_lr by a factor of 100
  -  decrease max_iter to 10,000
 
in train_val.prototxt:
  -  delete all loss1/* layers
  -  delete all loss2/* layers
  -  rename loss3/classifer layer to loss3/classifier_mod
  -  increase loss3/classifier_mod's learning rates by a factor of 10 (from 1, 2  to 10, 20)
 
Loss decreases and test top-1 accuracy hits ~97%, but I'm wondering if my approach is optimal/sensible.
 
cheers,
-Steven

Ashutosh Singla

unread,
Apr 25, 2016, 7:44:43 AM4/25/16
to Caffe Users
Hi, 
I am using GooLeNet model for image classification and now I want to use pre-trained model. Do you know how can I use pretrained GoogLeNet model for fine tunning? What are the steps?

beau norgeot

unread,
Aug 1, 2016, 6:30:53 PM8/1/16
to Caffe Users
Hi Steven,

I haven't tried fine-tuning googlenet through caffe. I think your approach is generally solid, however I'd be be concerned about time to convergence. You reduced the base_lr by a factor of 100 which will help to 'freeze' the weights that you want to keep. However, by increasing the lr for the loss3/classifier layer to 10/20 I think you're going to be learning parameters for your new data very slowly. If the original base_lr was 0.01, you've decreased that to .0001, for loss3 you've increased that back to .001 -- you're learning 10x slower than the base. If your learning is peaking you might consider bumping that rate up by a couple orders of magnitudes.
Have you tried comparing your caffe results with retraining using tensorFlow? (As a sanity/check baseline comparison)
-Beau



Reply all
Reply to author
Forward
0 new messages