While training loss get really small, test loss is not decreasing, is it normal?

1,751 views
Skip to first unread message

Jinchao Lin

unread,
Dec 2, 2015, 11:47:58 AM12/2/15
to Caffe Users
Hi, 

I am using Caffe to perform a image analysis task. I used a pre-trained model and performed fine-tunning on my own image dataset. During the training while my train loss decrease to really small number after 30000 iterations (<0.0001), but my test error remain pretty large and stable since the beginning of the training (~6.0-8.0). But my testing accuracy@1 and @5 do improved during the training process. 

I am pretty new to Caffe and deep learning. I am wondering are they normal ?? 

Thanks for any comment. 

Best, 
Jin

Hrant Khachatrian

unread,
Dec 2, 2015, 12:50:28 PM12/2/15
to Caffe Users
Probably it is heavily overfitting. If your training and test datasets are not completely different (they are randomly chosen from a good database), high test loss means that the network actually couldn't learn anything useful. One of the possible reasons would be that your training set is too small and the network easily learns "by heart" all the images.

Jinchao Lin

unread,
Dec 2, 2015, 4:29:35 PM12/2/15
to Caffe Users
Hi Hrant, 

Thanks for your comment. 

Together I have 4500 labeled image data with different sizes between 300~1000 (cropped from the Kaggle's rightwhale classification competition). 

I use 4000 images for training and the rest for testing. Those images belongs to 447 classes and the classification is fairly difficult, at least by human's eye inspection. I am using a pre-trained OxfordNet (VGG team in ILSVRC-2014). Do you have any suggestion on how to avoid this overfitting? 

p.s. I have tried with smaller AlexNet, which doesn't converge at all (training error keep fluctuating between 10~70). 

Thanks. 
Jin

p.Paul

unread,
Feb 16, 2017, 4:17:10 AM2/16/17
to Caffe Users
Did you solve this problem? . My regression task gives me loss between 10-30 and testing on a image used for training itself give 0 values at output. The parameters of last layers are also zero.However the layer above the last layer has some values

akashgu...@gmail.com

unread,
Feb 11, 2018, 3:28:23 AM2/11/18
to Caffe Users
Hey,

Were you able to solve this problem? Even I get high test loss and low training loss and my accuracy isn't good either.

Wanderson Souza

unread,
Jan 29, 2019, 11:58:52 AM1/29/19
to Caffe Users
Hello Akash and Jinchao,

Were you able to solve this problem? I have a problem very similar to yours.

Best Regards,

Wanderson Souza
Reply all
Reply to author
Forward
0 new messages