您的位置:首页 > Web前端

1、为什么caffe训练时训练集loss=0.06,验证集accuracy=0.98但测试集的准确率很低accuracy=0.67

2017-08-03 16:22 369 查看
1、https://groups.google.com/forum/#!topic/caffe-users/NzKEWAFPPfI 提出新的测试方法

2、https://github.com/pherrusa7/foodCAT/blob/master/caffeWrapper.py github源码

3、https://www.zhihu.com/question/56017256  知乎上提问

4、根据问题特征, 训练好的高精度模型重新在原来的训练集上做predict, 准确率比较低,做以下猜测:

predict 的时候没有做 data augmentation. 在图像识别中常用的一种方法是把输入图片做 augmentation, 然后, forward 之后取平均值. 因为 augmentation 之后的图片和原始图片的差异并不是很大, 因此, 题主做 predict 的时候没有 augmentation, 而在训练的时候做了 augmentation, 那么, 就容易出现题主描述的问题
预处理不一致. 如果训练和预测的预处理方法不同, 也有可能是出现类似的问题.
根据题主描述感觉题主可能是DL新手, 需要快糙猛出活, 所以, 感觉 1 的可能性很大

5、Google group 回答

I had the same issue, it seems like the problem was in my deploy.prototxt file where the name of the layers modified was not matching with the ones modified in train_val.txt. 

Fixing the error resulted in huge bump for the confidence score for the classes predicted.

作者:高钰舒

链接:https://www.zhihu.com/question/56017256/answer/147411720

来源:知乎

著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  caffe 深度学习 预测