4/23
Part 1 of 6 · From NumPy to PyTorchWatch
Watch · 11 min
Karpathy normalizes the rows of a count table with sum(1, keepdim=True), reads PyTorch's broadcasting rules, then drops keepdim to show the bug: the code still runs, and it normalizes the columns instead of the rows.
The spelled-out intro to language modeling: building makemore · Andrej Karpathy · Sep 2022YouTube