# Batch Normalization reference

Run `python examples/batchnorm.py` for self-checks or append `--json` for the JS parity payload. Python 3.10+, standard library only.

Source: Ioffe and Szegedy, ICML 2015 proceedings PDF, Algorithms 1–2 and Section 3 derivatives. Regions `training`, `backward`, `inference` are synchronized to website excerpts by the central source tool. Training uses variance divided by m. Inference consumes fixed statistics; the separate population estimator demonstrates the paper's m/(m−1) correction over equal-size batches.

This represents one feature, not a complete convolutional layer or trained Inception model. No dataset, optimizer, running-statistics implementation, checkpoint, ImageNet result or timing is reproduced. Inference population estimates are distinct from the exact variance of concatenated arbitrary finite batches.

`node --test test/batchnorm.test.mjs` checks constant and singleton boundaries, variance convention, finite-difference input and affine gradients, frozen-statistic independence, invalid parameters, and JS/Python parity. Crop provenance is in `public/images/papers/batch-normalization/source-crops.json`.
