Save this video — free

Building makemore Part 4: Becoming a Backprop Ninja

Andrej Karpathy · 1:55:24 · Watch on YouTube

Building makemore Part 4: Becoming a Backprop Ninja Watch on YouTube →

Overview

Andrej Karpathy's "Building makemore Part 4" details the manual implementation of backpropagation for a two-layer neural network, moving beyond PyTorch's autograd. This "Backprop Ninja" exercise covers deriving gradients for operations like cross-entropy loss, batch normalization, linear layers, and embeddings, emphasizing the importance of understanding internals for debugging and optimization. The lecture culminates in a fully manual training loop, demonstrating that complex neural networks can be trained without relying on automatic differentiation frameworks.

Key takeaways

Chapters

0:00 Motivation: The Need for Manual Backpropagation
0:37 Why Manual Backprop is Crucial
5:00 Historical Examples of Manual Backpropagation
11:46 Setting Up the Manual Backprop Notebook
13:18 Parameter Initialization for Debugging
15:05 Manual Backpropagation: D_log_probs
31:46 Manual Backpropagation: D_probs
34:19 Manual Backpropagation: D_counts
35:41 Manual Backpropagation: D_count_sum_inv
37:04 Manual Backpropagation: D_count_sum
43:46 Manual Backpropagation: D_counts (Second Pass)
53:49 Manual Backpropagation: D_normal_logits
55:14 Manual Backpropagation: D_logits (Softmax Branch)
1:03:56 Understanding Logit Maxima's Role
1:05:08 Manual Backpropagation: D_logits (Max Index Branch)
1:09:04 Manual Backpropagation: Linear Layer (Layer 2)
1:28:56 Manual Backpropagation: Tanh Activation
1:31:59 Manual Backpropagation: Batch Normalization
1:48:40 Batch Normalization: Bias Correction Discussion
1:55:03 Manual Backpropagation: Linear Layer (Layer 1)

Keep these chapters and the full searchable transcript in your own library.

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Andrej Karpathy.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.