Machine Learning Fundamentals · free preview

Forward Propagation on a Computational Graph

A forward pass computes and stores every intermediate quantity in dependency order, and drawing that dependency as a graph is what makes the backward pass mechanical.

1. The forward pass, in order

The forward pass, in order

2. Reading the graph

Reading the graph

3. What has to be kept

What has to be kept

4. Why the graph helps the backward pass

A computational graph records that h\mathbf{h} comes from applying ϕ\phi to z\mathbf{z}, and that z\mathbf{z} comes from multiplying W(1)\mathbf{W}^{(1)} by x\mathbf{x}. What does this structure give the backward pass?

5. The hidden activation formula

With no bias, h=ϕ(z)\mathbf{h}=\phi(\mathbf{z}) where z=W(1)x\mathbf{z}=\mathbf{W}^{(1)}\mathbf{x}. If the hidden layer has h=8h=8 units, the dimension of z\mathbf{z} is ____.

Practice this interactively

Free account · instant grading · spaced review that schedules itself.

Start this course for free