Caffe中的Leaky_Relu

wor*_*dom 7 machine-learning computer-vision caffe

我正在尝试在caffe中使用Leaky_Relu图层,并且无法确定在哪里定义它.从这里的图层定义,我可以看到ReLu有一个名为negative_slope的可选参数,可以用来定义一个leaky_relu,但我无法弄清楚这个negative_slope参数的位置.

ReLu定义如下所示:

layer {
  name: "relu1"
  type: "ReLU"
  bottom: "conv1"
  top: "conv1"
}
Run Code Online (Sandbox Code Playgroud)

我试过这样做,但它给我一个错误:

layer {
  name: "relu1"
  type: "ReLU"
  negative_slope: 0.1
  bottom: "conv1"
  top: "conv1"
}
Run Code Online (Sandbox Code Playgroud)

很感谢任何形式的帮助.

谢谢!

Jay*_*wal 9

如文档中所定义,negative_slope是一个参数.参数的定义方式如下.试试这个:

layer {
   name: "relu1"
   type: "ReLU"
   bottom: "conv1"
   top: "conv1"
   relu_param{
      negative_slope: 0.1
   }
 }
Run Code Online (Sandbox Code Playgroud)