Log inStart free
LESSON 5.12 · 5 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW

Weight initialization

Watch the starting weights make a signal fade, explode or hold through six layers.


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

Go Pro · $8.25/mo
EXPLAINER · 5.12 · INIT BAYFIXED σ 0.100 · 256 WEIGHTS IN W₁
01
Stage 1 of 5 · Random weights
Each weight is a random draw with a fixed σ of 0.1. The histogram shows the 256 weights of W₁.
Explain it simply

Before training, every weight is a random number. The bars at the bottom count the 256 weights that feed layer one. Most sit close to zero, within about 0.1. Nothing has been trained yet.

Eight columns of cells, x, six hidden layers and ŷ. Ochre bands between them. Below, a histogram of 256 weights with σ 0.100.

inputs and layer valuesweightsgradientsoutput ŷ
−3−2−10123σ = 0.10083xh₁h₂h₃h₄h₅h₆ŷW₁W₂W₃W₄W₅W₆W₇fixed σ = 0.1, whatever the layer size−3−2−10123σ = 0.10083xh₁h₂h₃h₄h₅h₆ŷW₁W₂W₃W₄W₅W₆W₇fixed σ = 0.1, whatever the layer size
Toy: 16 inputs → 6 layers of 16 → 1 output · 32 seeded examples · weights not trained
STAGE 1 / 5
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
wij∼N(0, σ2)\sy{w}{param}{w_{ij}} \sim \mathcal{N}(0,\ \sy{sig}{param}{\sigma}^2)
σ=0.1\sigma = 0.1

Each weight is a random draw with spread σ around 0.

Common mix-ups

MYTHEqual starting weights are fine, because training makes them differ.

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

Predict, then reveal
3 CHECKS · PRO
Q01With ReLU and σ 1 weights, does the size at h₆ stay near 1 or grow past 100?

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 2 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.