Deep Learning Section 029
Building Models with nn.Module
How PyTorch keeps track of your layers, and the building blocks you reach for in almost every model you write.
11 of 11 lessons published Three reading levels on every lesson
Lessons in order
Work top to bottom. Each lesson assumes the one above it.
- How nn.Module tracks parameters
- Sequential, ModuleList and ModuleDict
- Buffers vs parameters
- Weight initialisation
- model.train() and model.eval()
- BatchNorm and its running statistics
- nn.Embedding and index errors
- Padding and packing variable-length sequences
- Hooks for inspecting a running model
- Writing a custom loss function
- Transfer learning: swapping the head and freezing a backbone