The key difference from batch norm is which axis the statistics come from. Layer norm computes one mean and variance per example, across its features, so the result never depends on batch size.
Implement per_example_stats(x), which returns the mean and variance of each example's features as two arrays of length N.
x has shape (N, D).D).Reduce over the last axis: mean(axis=-1) and var(axis=-1).
No results yet
Run your code to check it against the examples, or submit to run every test.