本文介绍了Caffe中的"lr_policy"是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是尝试找出如何使用 Caffe .为此,我只看了示例文件夹中的不同.prototxt文件.有一种我不明白的选择:

I just try to find out how I can use Caffe. To do so, I just took a look at the different .prototxt files in the examples folder. There is one option I don't understand:

# The learning rate policy
lr_policy: "inv"

可能的值似乎是:

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

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

Could somebody please explain those options?

推荐答案

如果查看/caffe-master/src/caffe/proto/caffe.proto文件(可以在线找到它,请),您将看到以下说明:

If you look inside the /caffe-master/src/caffe/proto/caffe.proto file (you can find it online here) you will see the following descriptions:

// The learning rate decay policy. The currently implemented learning rate
// policies are as follows:
//    - fixed: always return base_lr.
//    - step: return base_lr * gamma ^ (floor(iter / step))
//    - exp: return base_lr * gamma ^ iter
//    - inv: return base_lr * (1 + gamma * iter) ^ (- power)
//    - multistep: similar to step but it allows non uniform steps defined by
//      stepvalue
//    - poly: the effective learning rate follows a polynomial decay, to be
//      zero by the max_iter. return base_lr (1 - iter/max_iter) ^ (power)
//    - sigmoid: the effective learning rate follows a sigmod decay
//      return base_lr ( 1/(1 + exp(-gamma * (iter - stepsize))))
//
// where base_lr, max_iter, gamma, step, stepvalue and power are defined
// in the solver parameter protocol buffer, and iter is the current iteration.

这篇关于Caffe中的"lr_policy"是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-03 17:48