Want faster training and better model performance? Batch normalization normalizes layer activations, then learns how to scale and shift them. section 11.2.1
Batch normalization changes behavior between training and inference:
- During training, calculate each activation’s batch mean and variance, normalize by standard deviation, then apply learned scale and shift parameters. section 11.2.1
- Maintain exponential moving averages of mean and variance separately from learned parameters. section 11.2.1
- During inference, use the stored averages and fixed learned scale and shift values, even for a single input. section 11.2.1
In Flax, treat the running statistics as model state rather than ordinary parameters; training updates that state through a mutable model-state path.








