Skip to main content

relu6

Function relu6 

pub fn relu6<const D: usize>(tensor: Tensor<D>) -> Tensor<D>
Expand description

Applies the ReLU6 function element-wise, the rectified linear unit clamped to the range [0, 6] (as used in MobileNetV2).

ReLU6(x) = min(max(0, x), 6)