The Maths You Actually NeedLesson 73 of 76

Module 8 · Numbers inside a machine

How variance travels through a layer, and the initialisation that follows

In this lesson

  • 9 min read
  • 8 reading sections
  • Knowledge check
  • Lesson 7 of 10 in this chapter

This chapter’s goalPredict from the bit layout of float32, fp16 and bf16 which computation will overflow, underflow or lose its digits, explain why a long sum drifts and how to fix it, quantise a weight to int8 by hand and say what an outlier does to the rest of the tensor, derive the initialisation scale that keeps variance constant through a layer, and diagnose a NaN in training back to the operation that produced it.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 9Free · no account needed
Lesson steps

One unit’s output is a sum

A unit in a linear layer computes y = Σ w_i x_i over fan_in inputs. Treat the weights and inputs as random: each w_i drawn with variance σ_w², each x_i with variance σ_x², all independent and centred on zero. Module 4’s rule that variances of independent terms add, and that the variance of a product of independent centred variables is the product of the variances, gives

Text
Var(y) = fan_in × σ_w² × σ_x²

That one line decides whether a deep network can be trained from a random start.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Stuck on something?Ask Funke, your AI tutor

How to cite: Addaly (2026) ‘How variance travels through a layer, and the initialisation that follows’, in The Maths You Actually Need. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/maths-you-need/variance-through-a-layer (Accessed: 29 November 2026).