sukritshankar / Caffe-LMDBCreation-MultiLabel

Creation of LMDB for training a multi-label loss in Caffe
71 stars 35 forks source link

Finetune model with wrong loss #6

Open StOnEGiggity opened 7 years ago

StOnEGiggity commented 7 years ago

Hi, Thanks for your contributions.I have dataset with 171 classes like closed issue #1 ,for example(image01.jpg 2 167 45).And I'd like to finetune with vgg16. I modifity train_val.prototxt like yours.I am sure that there is no difference except prototxt and dataset. And i get training result like this: Iteration 0,loss = 122.219 Ineration 20,loss=-1.27038e-6...
And loss doesn't change any more.How could this happen? There exist another problem:what does loss mean?I mean that I didn't find code like phase:TRAIN.It's training loss or anything else?Thanks

sukritshankar commented 7 years ago

The loss numbers are a bit weird !! The only suggestions I can provide here are (a) please see that the labels supplied in the text file are in the range [0, 255] which I reckon they are, seeing your numbers (b) Ensure that when you finetune, you declare two data layers is shown in the prototxt file - the layers mention the phases of TRAIN and TEST, whose variables are used at the end (c) Ensure that apart from the data reading, the rest of layers are properly copied with the same name as in the original prototxt from which you are finetuning, and the loss layer at the end has a changed name.