fn
layer_norm_forward_f64
void layer_norm_forward_f64(const double * x, const double * gamma, const double * beta, double * y, double * saved_mean, double * saved_rstd, int outer, int N, double eps)Double-precision LayerNorm forward — generic template implementation that computes mean and variance with a two-pass loop (no vDSP equivalent exists for double at the same fusion level).
Math
Parameters
xconst double*Input buffer of shape
(outer, N).gamma, betaconst double*Per-feature affine parameters of shape
(N,).ydouble*Output buffer of shape
(outer, N).saved_mean, saved_rstddouble*Per-row mean and reciprocal standard deviation, both shape
(outer,).outer, Nstd::size_tNumber of rows and length of the normalised axis.
epsdoubleVariance stabiliser.