13/26
Part 2 of 4 · BroadcastingWatch
Watch · 5 min

Andrej Karpathy hits this exact bug in PyTorch, which broadcasts by the same rule. He normalizes the rows of a 27 by 27 table of counts, leaves out keepdim, and the code runs while normalizing the columns instead.

The spelled-out intro to language modeling: building makemore · Andrej Karpathy · Sep 2022YouTube