ContentsThe library

Backpropagation in Full

What the Forward Pass Has to Leave Behind

Last timeThe Layer Where Everything Cancels

Every backward rule needs some forward value to work with, and those values have to be held from the moment they are produced until the backward pass reaches them. That is the real cost of training.

Every rule in this course has an ingredient list. The rule for a multiplication

needs the other input; the rule for a matrix product needs both. Those

ingredients come from the forward pass, and they have to still be there when the

backward pass arrives, which can be a long time later. That waiting is what

training costs.

Reading the appetite off the rule

You do not have to look anything up. Whatever appears in a rule that is not a

derivative is something the forward pass must leave behind.

FIG 1What each operation leaves behind, per element
values kept per elementarithmetic to use themrelative memory cost
an addition010
a saturating function111
a matrix product212
a gate111
The matrix product is the expensive one and it is also the one every layer contains. A saturating function can keep its output instead of its input, since its rule can be written either way, and keeping the output means one array rather than two when the output is needed anyway.

Additions are free, which is a small reason to prefer architectures full of them.

The lesson stops here

6 more paragraphs to go

You have read the opening. The rest of the argument, the problems that check whether it landed, and the lines worth keeping at the end all come with a plan.

The first lesson of every course in the library reads the whole way through, free, so you can see exactly what the rest of them are.

See the planThe contents

This is the reading half

Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.

The contents

The rest of this course

  1. 01There Are No Layers, Only Operations
  2. 02Multiply Along, Add Acrossopening only
  3. 03Two Ways to Accumulate, and Only One Is Affordableopening only
  4. 04Four Rules That Cover Most of a Networkopening only
  5. 05The Matrix Everybody Writes Down and Nobody Buildsopening only
  6. 06Why the Last Two Steps Are One Stepopening only
  7. 07What the Forward Pass Has to Leave Behindyou are here
  8. 08A Product of Many Small Numbersopening only

Read alongside