The first of two lectures on convolutional networks. Watch it for the motivation: a pattern can appear anywhere, so one small detector is scanned over every position with shared weights. Then build that scan here.
COURSE / REAL PRACTICE
Deep learning 2: images and sequences
Lectures 9 to 17 of CMU’s public 11-785 course as builds: convolution and pooling with their backward passes, a recurrent network trained through time, an LSTM, the CTC loss and beam search. Every build is graded against PyTorch or an exhaustive check. Unofficial practice material, not affiliated with CMU.
Read the explanation and diagrams, then work through the practice. Your browser profile supplies your saved progress.
What you’ll work toward
Build convolution, backpropagation through time, an LSTM cell and the CTC forward algorithm yourself, then train a recurrent recognizer with the CTC loss on sequences of different lengths, decode its output and measure its error rate.
Read an explanation, inspect the diagrams and work through the available checks, debugging exercises and builds. Feedback and prerequisite links guide the next step.
Before you start
This course builds on these skills:
Individual lessons can add prerequisites. Your lesson progress shows your actual readiness.
A look inside the first lesson
Scanning for patterns: the convolution layer
import numpy as np
x = np.array([[8, 9, 2, 1, 1], [9, 9, 1, 1, 0], [9, 8, 1, 2, 1], [8, 9, 2, 1, 1], [9, 9, 1, 0, 1]])
k = np.array([[1, 0, -1], [2, 0, -2], [1, 0, -1]])
window = x[0:3, 0:3]
print((window * k).sum(), (window * k[::-1, ::-1]).sum())Your lesson sequence
Follow the same units and lessons in either view. Prerequisite links and your practice progress stay with each lesson.
Convolutional networks
- LESSON 01.01
Scanning for patterns: the convolution layer
A convolution is one small detector scanned across the input with shared weights. Compute output sizes for any stride and padding and match F.conv2d in NumPy.
Open lesson - LESSON 01.02
Backpropagation through convolution and pooling
Every output position sends its error back through the same shared kernel: gradients for the kernel, the bias and the input, plus max pooling's routing.
Open lesson
Recurrent networks
- LESSON 02.01
Recurrent networks and backpropagation through time
Unroll a recurrent network over a sequence, then send the error back through every time step while the shared weights collect a gradient from each one.
Open lesson - LESSON 02.02
Vanishing gradients and the LSTM
See how a tanh recurrence shrinks or explodes its gradient, then build the LSTM cell whose additive cell state gives the error a path that the gates control.
Open lesson
Sequences without an alignment
- LESSON 03.01
CTC: training without an alignment
When the output is shorter than the input and nobody labelled the timing, sum over every alignment with the forward algorithm in log space, then decode by collapsing repeats and blanks.
Open lesson - LESSON 03.02
Language models and beam search
Score a sequence with the chain rule, see why the greedy choice can miss the best sequence, and keep the k best partial hypotheses instead.
Open lesson
WATCH ALONG
Videos for these lessons
One hand-picked talk, lecture or tutorial per lesson, in course order. They play here when you press play; nothing loads from the video provider before that.
6 videos· 8 h 42 min
01Scanning for patterns: the convolution layer
02Backpropagation through convolution and pooling
Pairs with this lesson by topic: how errors flow backward through convolutional layers, with a shared kernel. Watch it before you build conv2d_backward, then compare your gradients with autograd.
03Recurrent networks and backpropagation through time
The lecture this lesson is built around: recurrent networks over sequences and how they are trained by unrolling them in time. Watch it first, then build the forward pass, the backward sweep and gradient clipping here.
04Vanishing gradients and the LSTM
The lecture this lesson is built around: why a plain recurrent network struggles to carry information across many steps, and the gated LSTM cell designed for it. Watch it first, then build the cell here and compare it with PyTorch.
05CTC: training without an alignment
The first of two lectures on sequence-to-sequence problems where input and output lengths differ and the timing is not labelled. Watch it for the problem setting, then build the loss here.
06Language models and beam search
Paired with this lesson by topic: language models and generating a sequence one token at a time. Watch it for the setting and vocabulary, then build the decoding search here and compare it with exhaustive enumeration.