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