4/31
Part 1 of 6 · Derive the two gradientsLearn and do
dY is how the loss moves with each entry of Y
Some loss sits after . Write for : for each entry of , how fast the loss moves when that entry moves. It's one number per entry, so it has 's shape.
Backward is handed , as grad_out, and has to produce and : one number per entry of and of .
One entry of A reaches one row of Y
Nudge one entry of A and watch what moves:
A2 = A.clone()
A2[1, 0] += 0.001
print(A2 @ B - Y)
Nudge A[1, 0] up by 0.001. Which entries of Y move?
Pick one to see what it prints.
Pick an answer above to see the rest