machine-learning - Caffe 中的 Leaky_Relu

标签 machine-learning computer-vision caffe

我正在尝试在 caffe 中使用 Leaky_Relu 层,但无法真正弄清楚在哪里定义它。从图层定义here ,我可以看到 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"
}

非常感谢任何帮助。

谢谢!

最佳答案

根据文档中的定义,负斜率是一个参数。参数定义如下。试试这个:

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

关于machine-learning - Caffe 中的 Leaky_Relu,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39284872/

相关文章:

machine-learning - 如何在 keras 中使用 categorical_hinge 损失以便在最后一层使用 SVM 进行训练?

matplotlib - 为什么我画的 3 次多项式这么奇怪?

machine-learning - CNN - 将输出从Conv层 reshape 为dense层

matlab - 在 MATLAB 和 OpenCV 之间提取不同的 SURF 特征?

python - Tensorflow - 具有自定义数据集的卷积神经网络无法学习

python - 在 Caffe 中加载自定义 Python 层导入错误

machine-learning - 解释 Caffe FCN 输出类

python - scikit-learn 添加训练数据

machine-learning - 是什么导致 Caffe 抛出总线错误

python - Caffe:训练、验证和测试拆分