Caffe Prototxt 激活层系列:ReLU Layer

24 篇文章 13 订阅
16 篇文章 4 订阅

ReLU Layer 是DL中非线性激活的一种,常常在卷积、归一化层后面(当然这也不是一定的)

首先我们先看一下 ReLUParameter

// Message that stores parameters used by ReLULayer
message ReLUParameter {
	  // Allow non-zero slope for negative inputs to speed up optimization
	  // Described in:
	  // Maas, A. L., Hannun, A. Y., & Ng, A. Y. (2013). Rectifier nonlinearities
	  // improve neural network acoustic models. In ICML Workshop on Deep Learning
	  // for Audio, Speech, and Language Processing.
	  optional float negative_slope = 1 [default = 0];  //x负方向的斜率,relu为0,若不为0,则就是relu的变种
	  enum Engine {
	    DEFAULT = 0;
	    CAFFE = 1;
	    CUDNN = 2;
	  }
	  optional Engine engine = 2 [default = DEFAULT];
}

ReLU Layer 在prototxt里面的书写:

layer {
	  name: "relu"
	  type: "ReLU"
	  bottom: "conv/bn"
	  top: "conv/bn"
}

例如在Mobilenet中:

layer {
	  name: "relu6_4"
	  type: "ReLU"
	  bottom: "conv6_4/bn"
	  top: "conv6_4/bn"
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值