Tracing a Forward Pass Through Two Layers

A forward pass composes layer calculations to produce a prediction from one input and a fixed set of parameters.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Trace two scalar layers
  2. Use trace checkpoints

Trace two scalar layers

Let the first layer return ReLU of \(2x-1\), and the second multiply that result by three. Input two gives first score three, activation three, and output nine. Input zero gives activation and output zero. See ReLU's boundary.

Use trace checkpoints

Record the intermediate score and activation so a mismatch can be located before the final result. Function composition describes the stage dependency.[1]

References

  1. Ian Goodfellow, Yoshua Bengio and Aaron Courville, Deep Learning ↩