Function silu

pub fn silu<const D: usize, B>(tensor: Tensor<B, D>) -> Tensor<B, D>
where B: Backend,
Expand description

Applies the SiLU function (also known as the swish function) element-wise.

SiLU(x) = x * sigmoid(x) = x / (1 + exp(-x))