Recurrent networks
Sentences, speech and prices arrive one step at a time and can be any length. A recurrent network reuses one cell at every step and carries a memory forward. Training it means backpropagating through time — and multiplying the same Jacobian again and again, which makes gradients vanish or explode.
55 min
After this lesson you can
- Explain why fixed-size windows are a poor fit for sequences, using Elman's shifted-pattern example
- Write the recurrence with every shape, and count its parameters
- Unroll an RNN and derive backpropagation through time
- Show that the gradient across many steps is a product of Jacobians, and relate its growth or decay to the spectral radius of
- Implement a character-level RNN with BPTT and gradient clipping in NumPy
In this lesson
- Why a window isn’t enough
- The recurrence
- The picture: unrolling through time
- Backpropagation through time
- The problem: a product of Jacobians
- A patch for exploding gradients: clipping
- The code
This lesson is part of Descent Pro
Descent Pro unlocks every lesson on the route, from base camp to the summit. Every plan starts with a free trial.