Skip to course content
Free PyTorch course

Advanced Deep Learning with PyTorch

Module 08 Summary

The idea this module was built around

An embedding is a learnable lookup table. Its geometry comes from the task it was trained on and nowhere else — an untrained table's similarities are noise.

What you can now do

The trap this module removed

Mean-pooling without a mask. Padding positions get averaged into the representation, so short sequences are diluted by however much padding they happened to need.

Figures worth remembering

Attention weights sum to 1 per row. Bag-of-words sees identical vectors for "good service" and "service good".

Before you move on

Measure bag-of-words on your actual task before assuming you need a sequence model. It is often within a few points.