๐Ÿ“Š Batch Normalization: Training & Inference

161 words
1 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# ๐Ÿ“Š Batch Normalization: Training & Inference ## 1. ๐ŸŽฏ Learning Objectives - Explain why batch normalization accelerates training - Distinguish training behavior (batch stats) from inference (running averages) - Compare batch norm with layer norm and instance norm ## 2.

๐Ÿ“Š Batch Normalization: Training & Inference

1. ๐ŸŽฏ Learning Objectives

  • Explain why batch normalization accelerates training
  • Distinguish training behavior (batch stats) from inference (running averages)
  • Compare batch norm with layer norm and instance norm

2. ๐Ÿ“– Core Content

3.1 Internal Covariate Shift

The distribution of layer inputs changes during training because previous layers' parameters change. This forces layers to continuously adapt to shifting input distributions, slowing training.

3.2 Batch Normalization Algorithm

Training: Normalize using batch mean ฮผ_B and variance ฯƒยฒ_B, then scale/shift with learnable ฮณ, ฮฒ. Inference: Use running averages of ฮผ and ฯƒยฒ computed during training.

3.3 Benefits

  1. Allows higher learning rates (less sensitivity to initialization)
  2. Reduces need for dropout (provides regularization)
  3. Accelerates convergence (2-10ร— faster)
  4. Reduces vanishing gradient problem

3.4 Normalization Variants

TypeNormalizes AcrossUse Case
Batch NormBatch dimensionCNNs, MLPs
Layer NormFeature dimensionRNNs, Transformers
Instance NormSingle sampleStyle transfer
Group NormGroups of channelsSmall batch sizes
Document outline

Keep your place and jump directly to a heading.

Table of contents

No note selected

Open a chapter to see its outline, backlinks, and sources here.