Log inStart free
LESSON 5.C2 · 5 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

Normalization layers — which axis gets normalized

Watch five norms split one tensor into sets along different axes.


Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 3 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 5.C2 · NORM BAY3 × 4 × 2 TENSOR · 24 VALUES
01
Stage 1 of 5 · One tensor
One tensor holds 3 examples, 4 channels and 2 positions: 24 values. All five norms start from this tensor.
Explain it simply

Each square is one number that a layer passed on. Each block is one example, each row is a channel, and each column is a position. These three directions are called axes, named N, C and L. Every norm below starts from this same tensor.

A grid of 3 blocks, one per example, each with 4 rows and 2 columns. 3 of them are in the batch. Example 1, channel 4 holds 9.9 and 11.0.

activations xone setoutput above 0output below 0a mean of 0running averages
N = 3 of 3 examples · C = 4 channels · L = 2 positionsexample 112example 212example 312positionchannel 1channel 2channel 3channel 42.74.41.00.94.34.69.911.01.80.9−2.0−2.5−3.10.12.60.55.56.52.31.67.15.47.82.6one tensorx: 3 of 3 examples × 4 channels × 2 positions = 24 valuesN = 3 of 3 examples · C = 4 channels · L = 2 positionsexample 112example 212example 312positionchannel 1channel 2channel 3channel 42.74.41.00.94.34.69.911.01.80.9−2.0−2.5−3.10.12.60.55.56.52.31.67.15.47.82.6one tensorx: 3 of 3 examples × 4 channels × 2 positions = 24 values
Toy: the 3 × 4 × 2 tensor of 5.13 · seeded · outputs before γ and β
STAGE 1 / 5
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
xn,c,l\sy{x}{data}{x_{n,c,l}}
x∈R3×4×2x \in \mathbb{R}^{3 \times 4 \times 2}

Each value has an example n, a channel c and a position l.

Common mix-ups

MYTHGroupNorm is a different method from LayerNorm and InstanceNorm.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01With a batch of 1, which panel does BatchNorm match?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
  • 4 more stages and 3 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.