Normalization practice problems
11 problems · 0 solved
Normalization layers rescale activations so each layer sees inputs with a steady mean and spread. This makes deep networks train faster and more reliably. It is a bit like a teacher grading on a curve so every class is compared on the same scale. Different layers normalise over different axes, and that choice matters. In these problems you will implement LayerNorm forward, normalise activations with RMSNorm as used in Llama, standardise conv weights per output channel, implement BatchNorm with running statistics for inference, implement GroupNorm with contiguous channel groups, derive the LayerNorm backward pass, and derive the BatchNorm training-mode backward pass for both 2-D and 4-D inputs. Start with the Easy problems on LayerNorm and RMSNorm. Then do BatchNorm inference and GroupNorm, and finish with the two backward derivations, which test your chain rule skills. Interviewers often ask how LayerNorm differs from BatchNorm or why transformers use pre-norm, and bugs in normalization, such as using batch statistics at inference, are a common cause of models that work in training but fail in production.