antingshen / resnet-protofiles

Caffe Protofiles for MSRA ResNet: train prototxt
215 stars 244 forks source link

ResNet-50 Overfitting #14

Open ghost opened 6 years ago

ghost commented 6 years ago

Hello @antingshen

I have been training ResNet-50 from scratch using your train_val file, but my training is overfitting to an extent that my training accuracy is 100% (both top1 and top5), where as my testing accuracy (on 50000 validation images) is less than 10% (4% top-1 and 15% top-5)

I1008 23:39:35.303689  5233 solver.cpp:331] Iteration 92000, Testing net (#0)
I1008 23:39:54.131199  5233 solver.cpp:398]     Test net output #0: acc/top-1 = 0.047
I1008 23:39:54.131352  5233 solver.cpp:398]     Test net output #1: acc/top-5 = 0.158
I1008 23:39:54.131367  5233 solver.cpp:398]     Test net output #2: loss = 5.72002 (* 1 = 5.72002 loss)
I1008 23:39:54.279186  5233 solver.cpp:219] Iteration 92000 (1.63045 iter/s, 24.533s/40 iters), loss = 0.0226289
I1008 23:39:54.279218  5233 solver.cpp:238]     Train net output #0: acc/top-1 = 1
I1008 23:39:54.279225  5233 solver.cpp:238]     Train net output #1: acc/top-5 = 1
I1008 23:39:54.279233  5233 solver.cpp:238]     Train net output #2: loss = 0.0249973 (* 1 = 0.0249973 loss)

Could this be because of lack in data augmentation as I don't see any random crop or horizontal flipping happening on training lmdb data?

antingshen commented 6 years ago

You're getting 100% train accuracy on imagenet? It sounds like a training data issue perhaps