What it does
During training, batch normalization standardizes each channel using the mean and variance of the current batch, which keeps activations in a steady range and lets networks train faster with larger learning rates. It also keeps running averages of those statistics. At inference time those stored averages are used, so the layer becomes a fixed per-channel scale and shift, and exporters often fold it into the preceding convolution’s weights and bias. That is why many ONNX graphs of CNNs contain no BatchNormalization nodes at all.
Formula
yc = γc · (xc − μc) / √(σc2 + ε) + βcfolded into a conv: W′ = W · γ / √(σ2 + ε), b′ = (b − μ) · γ / √(σ2 + ε) + βShapes and parameters
- Shapes
- Input [N, C, H, W]; four vectors of length C; output [N, C, H, W].
- Parameters
- 2 × C learned (γ, β) plus 2 × C stored statistics (μ, σ²). A 64-channel layer has 128 learned values and 128 statistics.
- Used for
- Most CNNs: MobileNet, ResNet, U-Net variants, detectors, speech enhancement models.
In WeightSpace
One audio enhancement model in the catalog exposes a single batch-norm bias in its decoder as its editable parameter, within ±8. Elsewhere it is read-only.
Where it appears
- Find rows and cells in a tablePaddleOCR SLANet+731.9M params
- Identify houseplantsMobileNet V127219K params
- Cut out a portraitMODNet166.5M params
- Remove background noiseGTCRN1148K params
- Find video shot changesTransNetV267.6M params
- Track the pitch of a soundCREPE Tiny6487K params
- Find text regions on an imagePP-OCRv5 Mobile Detection31.2M params
- Generate a tiny imageCIFAR-10 Conditional GAN312M params
- Find beats and downbeatsBeat This! Small13.2M params