Log inStart free
LESSON 5.06 · 6 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW

GELU and SiLU

Watch GELU and SiLU gate each unit smoothly instead of switching it off.


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

Go Pro · $8.25/mo
EXPLAINER · 5.06 · ACTIVATION BAY32 PAIRS · Z FROM −1.84 TO 1.82 · 14 BELOW 0
01
Stage 1 of 6 · Pre-activations
Each of the 4 hidden units reads the 8 inputs x. Its sum z = w·x + b is the pre-activation.
Explain it simply

You see four rows of dots, one row per unit. Each dot is one unit reading one input. The unit multiplies x by its weight w and adds its bias b, which gives z, its pre-activation. Unit 1's weight is tiny, so its eight dots sit almost on one spot. These weights are not trained.

4 rows of 8 dots on the z axis, one row per unit, from −1.84 to 1.82. The 8 dots of unit 1 overlap near 0.5. A grid of 4 by 8 cells lists each z.

x, zw, b, gateoutput hslopeReLU
z (pre-activation)−2−1012unit 1unit 2unit 3unit 4pre-activation z = w·x + binput xwb−2e−3 means −2.2 × 10⁻³: small, not 0−1.00−0.71−0.43−0.140.140.430.711.00unit 10.020.49unit 2−1.83−0.01unit 3−1.27−0.18unit 4−1.18−0.330.470.480.480.490.490.500.500.511.821.290.780.25−0.27−0.80−1.31−1.841.090.720.37−2e−3−0.36−0.73−1.08−1.450.850.510.18−0.16−0.50−0.84−1.17−1.514 units × 8 inputsunit 3, x = 0.43: z = w·x + b = −1.27 × 0.43 + (−0.18) = −0.73z (pre-activation)−2−1012unit 1unit 2unit 3unit 4pre-activation z = w·x + binput xwb−2e−3 means −2.2 × 10⁻³: small, not 0−1.00−0.71−0.43−0.140.140.430.711.00unit 10.020.49unit 2−1.83−0.01unit 3−1.27−0.18unit 4−1.18−0.330.470.480.480.490.490.500.500.511.821.290.780.25−0.27−0.80−1.31−1.841.090.720.37−2e−3−0.36−0.73−1.08−1.450.850.510.18−0.16−0.50−0.84−1.17−1.514 units × 8 inputsunit 3, x = 0.43: z = w·x + b = −1.27 × 0.43 + (−0.18) = −0.73
Toy: the 5.C1 net at its start · 4 hidden units × 8 inputs · weights not trained
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
z=w⋅x+b\sy{z}{data}{z} = \sy{w}{param}{w} \cdot \sy{x}{data}{x} + \sy{b}{param}{b}
z=(−1.27)(0.43)+(−0.18)=−0.73z = (-1.27)(0.43) + (-0.18) = -0.73

Each unit multiplies x by its weight and adds its bias.

Common mix-ups

MYTHLike ReLU, GELU never gives a negative output.

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

Predict, then reveal
3 CHECKS · PRO
Q01If the input scale goes to ×3, do more GELU gates sit near 0 or 1?

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

PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
  • 5 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.