caffe icon indicating copy to clipboard operation
caffe copied to clipboard

Caffe loss not converge

Open ShijianTang opened this issue 11 years ago • 1 comments

Hi,

I have problem in fine-tune the CaffeNet model for my dataset.

I have changed the last layer to adjust the number of output to 20 for my data. I set learning rate as 0.001 and decrease by 0.9 every 1000 iter.

The loss for iter 1 is around 3.0, and in the first 30 iteration, my loss goes down to less than 1 and test acc is 0.41. Then loss slightly increase to around 2.0. But after about 1000 iter, my loss goes to 87 suddenly and remain unchanged, test acc becomes 0.02.

Can anyone tell me what is wrong here? I think my learning rate is not too large.

ShijianTang avatar Mar 04 '15 08:03 ShijianTang

One trick is to put the learning rate on your last layer (the new one) higher than the previous finetuned layers (for example 10x). Learning rate 0.001 seems to be not that high but you can still try lower that a little bit.

n-zhang avatar Mar 12 '15 23:03 n-zhang