Plain normalization removes information the layer may need, such as an overall scale or offset per feature. Layer norm therefore adds a learned gain and bias, as in the paper, so the layer can choose how much normalization to keep.
Implement layernorm(x, gamma, beta, eps), which normalizes each example over its features and then applies the per-feature gamma and beta.
gamma and beta have shape (D,).Reuse the last-axis normalization from normalize_last_axis and multiply by gamma, then add beta.
No results yet
Run your code to check it against the examples, or submit to run every test.