Skip to main content

layer_norm

Function layer_norm 

Source
pub fn layer_norm(
    x: &Tensor,
    weight: &Tensor,
    bias: &Tensor,
    eps: f64,
) -> Result<Tensor>
Expand description

Standard LayerNorm over the last dim: (x - mean) / sqrt(var + eps) * weight + bias.