深度学习之经验总结
2017-11-17 14:08
239 查看
1.一个深度网络,预训练时网络入口为224 x 224,而fine-tune时为448 x 448,这会带来预训练网络与实际训练网络识别图像尺寸的不兼容。yolov2直接使用448 x 448的网络入口进行预训练,然后在检测任务上进行训练,效果得到3.7%的提升。
2. 一个二分类网络,如何accrucy一直是0.5,除了label标签有问题外,另外还可能是网络太深,而验证集的规模过小(如几百张)。解决方案两种:
第一种即加大验证集的规模;第二种即砍层将网络深度变浅。
3.The
The reported "iteration loss" is the weighted sum of all loss layers of your net, averaged over
而当batch_size设置为训练集的大小时,实现的就是batch梯度下降,也就是全量梯度下降。而当batch_size设置成中间只时就相当于mini_batch梯度下降 。在我自己的实验中发现,当使用全量梯度下降时,损失曲线下降较平滑,但是收敛速度比较慢而当使用mini_batch梯度下降是,损失曲线会有震荡下降的趋势,这在一方面可以跳过局部最小值,另一方面也造成了正确率会剧烈震荡。当batch_size的值设置的越小,可能震荡越剧烈。而且,batch_ssize设置越大(越接近训练数据总量)训练速度也越快。另外,有一种自适应梯度下降法,叫adam,可以使收敛速度加快,效果较好,是目前用的比较多的一种梯度下降法。另外,可以将学习率设置成随着训练的进行慢慢减小,这样也能 使最终结果收敛到一个较好的值。根据我的经验,比如迭代10000次,在100次里面验证集损失值没有下降,就将学习率减半,而在1000次里面学习率没有下降就提前停止训练。
2. 一个二分类网络,如何accrucy一直是0.5,除了label标签有问题外,另外还可能是网络太深,而验证集的规模过小(如几百张)。解决方案两种:
第一种即加大验证集的规模;第二种即砍层将网络深度变浅。
3.The
net output #kresult is the output of the net for that particular iteration / batch while the
Iteration T, loss = Xoutput is smoothed across iterations according to the
average_lossfield.
The reported "iteration loss" is the weighted sum of all loss layers of your net, averaged over
average_lossiterations. On the other hand, the reported "train net output..." reports each net output from the current iteration only. In your example, you did not set
average_lossin your
'solver', and thus
average_loss=1by default. Since you only have one loss output with
loss_weight=1the reported "train net output..."and "iteration loss" are the same (up to display precision).
Thanks a lot @Shai for the answer. Could you please tell me how I can define that average_lossin my solvertoo? I checked it in googlenetand it was like average_loss: 40. Is it an initial value for that?– user6726469 Oct 18 '16 at 10:51 | |||
@user6726469 the default value is 1. I usually set it to the same value of displayparameter. It's up to you to decide what interval to average. – Shai Oct 18 '16 at 10:53 |
相关文章推荐
- 深度学习总结(七)——调参经验
- 深度学习经验总结
- 深度学习训练的小技巧,调参经验。总结与记录
- 深度学习训练的小技巧,调参经验。总结与记录。
- 深度学习原理解释及实践经验总结(来自Ilya Sutskever)
- 深度学习训练的小技巧,调参经验。总结与记录。
- 初学深度学习(TensorFlow框架的心得and经验总结)自用环境的总结
- 深度学习训练的小技巧,调参经验。总结与记录。
- 总结5条对学习Linux系统有帮助的经验心得
- OpenCV 学习小结(错误排除、经验总结)
- Vue深度学习总结
- 深度学习的一些经验和体会
- 学习ADO时总结的一些经验
- 学习经验总结(二)
- 深度学习(卷积神经网络)一些问题总结
- 深度学习与文本分类总结第二篇--大规模多标签文本分类
- 深度学习DeepLearning.ai系列课程学习总结:12. 优化算法实战
- 深度学习用于图片的分类和检测总结
- 深度学习网络压缩模型方法总结(model compression)
- 安卓学习经验总结:芯灵思开发板安卓底层开发