Batch and Layer Normalization Axes
Compute a standardized feature along the intended axis and explain which statistics change between training and inference.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
The reduction axis identifies the reference population
Batch normalization commonly estimates moments for a channel over appropriate batch and spatial positions, then normalizes with a small stabilizing constant and learned affine parameters. Layer normalization can compute moments over features within one token or example. These operations answer different questions even when both subtract a mean and divide by a standard deviation. Shape documentation should identify the axes exactly.
Stored training moments change dependence on other examples
In typical batch normalization inference, use running statistics rather than moments from one newly assembled batch. With layer normalization the per-example reduction is normally performed for each input at inference too. Small batches or a shifted inference population can change behavior. Tensor shapes explain where shared parameters apply. Training and test boundaries ensure evaluation uses the intended fitted state.[1]