Loading…
Glossary term
A technique that normalizes values across a batch of examples to speed up and stabilize training.
Batch normalization normalizes each feature across the examples in a batch, then lets the network rescale it. It speeds up training and lets higher learning rates be used.
It is common in convolutional networks, whereas transformers more often use layer normalization.
Batch normalization in PyTorch
import torch.nn as nn
bn = nn.BatchNorm2d(num_features=16)It was a key technique for training deep image models reliably.