CS231n Winter 2016: Lecture 11: ConvNets in practice

18 Feb 2016 · 75 min
1:15:03

In this lecture Andrej Karpathy walks through the practical aspects of training convolutional neural networks (CNNs). After brief administrative announcements, he introduces three major themes: (1) data augmentation and transfer learning for small datasets, (2) designing and stacking convolutional layers efficiently, and (3) low‑level implementation details that affect speed and memory. He explains how simple augmentations (flipping, random crops, color jittering, PCA‑based color perturbation) act as stochastic regularizers and how they are applied at test time via multi‑crop averaging. He then covers transfer learning strategies—using pretrained ImageNet models as fixed feature extractors, fine‑tuning varying numbers of top layers, and practical tips such as learning‑rate schedules for frozen, newly‑initialized, and fine‑tuned layers. The lecture dives deep into convolution design: receptive‑field growth, why stacking 3×3 filters approximates larger filters, parameter and compute savings of 3×3 stacks versus a single 7×7, the 1×1 bottleneck sandwich (reduce‑compute, increase non‑linearity), factorising 3×3 into 3×1 and 1×3, and how these ideas appear in VGG, GoogLeNet, and ResNet. Implementation techniques are surveyed: im2col → matrix multiplication, FFT‑based convolution (useful only for large kernels), Strassen‑like fast algorithms for 3×3, and the importance of cuDNN/cuBLAS. He discusses hardware considerations: CPU vs GPU parallelism, data‑parallel multi‑GPU training (synchronous vs asynchronous SGD), model‑parallel tricks, and the role of TensorFlow and other frameworks. Finally, he highlights common bottlenecks (CPU‑GPU memory transfer, disk I/O, GPU memory limits) and the impact of numeric precision, from 32‑bit to 16‑bit half‑precision, stochastic rounding for low‑bit fixed‑point, and recent binary‑weight networks. The lecture ends with a recap of the four practical takeaways.

Chapters

More from Andrej

youtube.com

Skill Issue: Andrej Karpathy on Code Agents, AutoResearch, and the Loopy Era of AI

7mo ago
youtube.com

Andrej Karpathy — “We’re summoning ghosts, not building animals”

1y ago
youtube.com

How I use LLMs

1y ago
youtube.com

CUDA Mode Keynote | Andrej Karpathy | Eureka Labs

2y ago
youtube.com

No Priors Ep. 80 | With Andrej Karpathy from OpenAI and Tesla

2y ago
youtube.com

Let's reproduce GPT-2 (124M)

2y ago
youtube.com

Let's build the GPT Tokenizer

2y ago
youtube.com

[1hr Talk] Intro to Large Language Models

2y ago
youtube.com

Let's build GPT: from scratch, in code, spelled out.

3y ago
youtube.com

Building makemore Part 5: Building a WaveNet

3y ago
youtube.com

Andrej Karpathy: Tesla AI, Self-Driving, Optimus, Aliens, and AGI | Lex Fridman Podcast #333

4y ago
See all content