Batch normalization

Normalization · node type · BatchNormalization

Normalizes each channel with statistics gathered during training, then applies a learned gain and bias.

Also called BatchNorm, BN

Figure 1. Batch normalization inside Generate a tiny image, a real model in WeightSpace. The 3 outlined nodes are Batch normalization; select any node for its shapes and parameters.

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.

Figure 2. The typed ports of Batch normalization, in the same format as every model drawing. Letters such as N or C stand for any size.

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.