Skip to main content

layer_norm

Function layer_norm 

Source
pub fn layer_norm(x: &mut [f64], weight: &[f64], bias: &[f64], eps: f64)
Expand description

Layer normalization in place: x_i ← ((x_i − μ) / sqrt(σ² + eps)) · weight_i + bias_i, with μ, σ² the mean and (population) variance over x. weight/bias match x.