Sequence Models

RNNs, LSTMs, encoder-decoders and the attention mechanism that replaced them.

Module 04.6 · Advanced
Free

10h · 7 lessons · 1 challenge

Before this: Convolutional Networks & Vision

About this module

Attention is introduced here for the reason it was invented: the encoder-decoder bottleneck. Meeting it as a fix to a problem you have already felt makes the transformer track land very differently from meeting it as an architecture diagram.

RNNs and LSTMs are covered properly — they still appear in interviews, and truncated backpropagation through time teaches something no feedforward model does.

After this module you can

7 lessons

Lesson 1
Recurrence, hidden state and BPTT
Kind
Concept
Length
55 min
Lesson 2
LSTM and GRU gates, mechanism by mechanism
Kind
Concept
Length
55 min
Lesson 3
Encoder-decoder models and the bottleneck
Kind
Concept
Length
50 min
Lesson 4
Attention, derived from the problem it solves
Kind
Concept
Length
60 min
Lesson 5
Build a sequence-to-sequence model with attention
Kind
Lab
Length
110 min
Lesson 6
Attention Spotlight: read the alignment map
Kind
Interactive
Length
35 min
Lesson 7
Checkpoint: sequence architecture choices
Kind
Checkpoint
Length
25 min

The challenge: Attention Spotlight

An alignment heatmap from a translation model. Predict what the model attended to next — then see whether you or it was right.

Worth 450 XP.

Related modules

All modules