Checkpoint
One last thing before we move on. Same surface as a write step — but the lesson doesn't complete until this passes.
Checkpoint. Show the loop works by reporting the loss before and after
training. Write report(w, x, y, lr, steps) that records the starting
loss, runs the four-beat loop steps times (recomputing pred each
iteration), and returns:
loss 100.00 -> 0.01
(start loss -> final loss, each to 2 decimals). Loss is (w*x - y)**2;
gradient is 2*(pred - y)*x; update is w - lr*grad.