pub fn hard_swish<const D: usize>(tensor: Tensor<D>) -> Tensor<D>
Applies the hard swish function element-wise.
hard_swish(x) = x * hard_sigmoid(x) = x * max(0, min(1, x/6 + 0.5))