我在尝试在 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"}
任何帮助都将非常感谢。
谢谢!
回答:
如文档中所定义,negative_slope 是一个参数。参数的定义方式如下。请尝试这样做:
layer { name: "relu1" type: "ReLU" bottom: "conv1" top: "conv1" relu_param{ negative_slope: 0.1 } }