ReLU6#
- class brainpy.dnn.ReLU6(inplace=False)[source]#
Applies the element-wise function:
\[\text{ReLU6}(x) = \min(\max(0,x), 6)\]- Parameters:
inplace (
bool
) – can optionally do the operation in-place. Default:False
- Shape:
Input: \((*)\), where \(*\) means any number of dimensions.
Output: \((*)\), same shape as the input.
Examples:
>>> import brainpy as bp >>> import brainpy.math as bm >>> m = bp.dnn.test_ReLU6() >>> input = bm.random.randn(2) >>> output = m(input)