Caffe:Api:ReLULayer
Rectified Linear caffe layer class.
ReLUParameter
- negative_slope [default 0]
- specifies whether to leak the negative part by multiplying it with the slope value rather than setting it to 0.
Protobuf example
Math
- 방정식 (Forward)
\(f(x) = \left \{ \begin{array}{rcl} 0 & \mbox{for} & x < 0\\ x & \mbox{for} & x \ge 0\end{array} \right.\)
- 미분 (Backward)
\(f'(x) = \left \{ \begin{array}{rcl} 0 & \mbox{for} & x < 0\\ 1 & \mbox{for} & x \ge 0\end{array} \right.\)
C++
- 방정식 (Forward)
- 미분 (Backward)
// n: Negative slope
bottom_diff[i] = top_diff[i] * ((bottom[i] > 0 ? 1 : 0) + n * (bottom[i] <= 0 ? 1 : 0));
Graph
See also
- Caffe
- Caffe:Api
- Caffe:Api:NeuronLayer
- Activation function