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} is the result of applying ϕ\phi to z\mathbf{z}, and that z\mathbf{z} is the result of a matrix product of W(1)\mathbf{W}^{(1)} with x\mathbf{x}. What does this structure give the backward pass?

5. The hidden activation formula

With no bias in the hidden layer, the hidden activation h\mathbf{h} satisfies h=ϕ(z)\mathbf{h} = \phi(\mathbf{z}) where z=W(1)x\mathbf{z} = \mathbf{W}^{(1)}\mathbf{x}. The dimension of z\mathbf{z} is ____ for hh hidden units.

Practice this interactively

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

Start this course for free