relu6#
- class brainstate.nn.relu6(x)[source]#
Rectified Linear Unit 6 activation function.
Computes the element-wise function:
\[\mathrm{relu6}(x) = \min(\max(x, 0), 6)\]Under differentiation, we take:
\[\nabla \mathrm{relu}(0) = 0\]and
\[\nabla \mathrm{relu}(6) = 0\]- Parameters:
x (
Array|ndarray|bool|number|bool|int|float|complex|Quantity) – Input array.- Returns:
An array with the same shape as the input.
- Return type:
Array|Quantity
See also
reluStandard ReLU activation function.