Caffe 中的“lr_policy”是什么?

2023-12-31

我只是想知道如何使用Caffe http://caffe.berkeleyvision.org/。为此,我只是看看不同的.prototxt示例文件夹中的文件。有一个选项我不明白:

# The learning rate policy
lr_policy: "inv"

可能的值似乎是:

  • "fixed"
  • "inv"
  • "step"
  • "multistep"
  • "stepearly"
  • "poly"

有人可以解释一下这些选项吗?


随着优化/学习过程的进展,降低学习率 (lr) 是一种常见的做法。然而,尚不清楚学习率应该如何作为迭代次数的函数而降低。

如果你使用DIGITS https://github.com/NVIDIA/DIGITS作为 Caffe 的界面,您将能够直观地看到不同的选择如何影响学习率。

fixed:学习率在整个学习过程中保持固定。


inv: the learning rate is decaying as ~1/T
enter image description here


step: the learning rate is piecewise constant, dropping every X iterations
enter image description here


multistep: piecewise constant at arbitrary intervals
enter image description here


您可以准确地看到函数中学习率是如何计算的SGDSolver<Dtype>::GetLearningRate https://github.com/BVLC/caffe/blob/master/src/caffe/solvers/sgd_solver.cpp#L27 (求解器/sgd_solver.cpp线〜30)。


最近,我发现了一种有趣且非常规的学习率调整方法:Leslie N. Smith 的作品《No More Pesky Learning Rate Gussing Games》 http://arxiv.org/abs/1506.01186。莱斯利在他的报告中建议使用lr_policy在递减和递减之间交替增加学习率。他的工作还提出了如何在 Caffe 中实施此策略。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Caffe 中的“lr_policy”是什么? 的相关文章

随机推荐