Caffe中的Leaky_Relu

7
我正在尝试在caffe中使用Leaky_Relu层,但无法确定在哪里定义它。从这里的层定义中可以看到,ReLu有一个可选的参数叫做negative_slope,可以用于定义leaky_relu,但我无法确定这个negative_slope参数应该放在哪里。ReLu的定义如下:
layer {
  name: "relu1"
  type: "ReLU"
  bottom: "conv1"
  top: "conv1"
}

我尝试这样做,但是出现错误:

layer {
  name: "relu1"
  type: "ReLU"
  negative_slope: 0.1
  bottom: "conv1"
  top: "conv1"
}

任何帮助都非常感激。
谢谢!
1个回答

9

根据文档的定义,negative_slope是一个参数。而参数的定义方式如下所示。试试这个:

layer {
   name: "relu1"
   type: "ReLU"
   bottom: "conv1"
   top: "conv1"
   relu_param{
      negative_slope: 0.1
   }
 }

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接