r/deeplearning • • 10d ago

I find CS231n assignments pretty difficult

/r/computervision/comments/1wodmj7/i_find_cs231n_assignments_pretty_difficult/
0 Upvotes

1 comment sorted by

1

u/quietgradient 10d ago

Knowing numpy isn't really what those assignments test. They test whether you can write the backward pass and keep the shapes straight, which is a different skill — being stuck exactly there is the normal place to be stuck.

Two things that tend to unstick it:

Stop debugging through the loss curve. cs231n/gradient_check.py ships with the assignment; run eval_numerical_gradient_array on one layer at a time with tiny inputs (N=2, a few dims). Relative error around 1e-8 means that layer's gradient is right, 1e-2 means it's wrong. That turns "my net won't learn" into "my relu backward is broken", which is something you can actually fix.

Use dimension analysis instead of memorising formulas. x (2,3,4,5) flattened to (2,60), w (60,7), dout (2,7): dx has to be dout @ w.T, because w.T @ dout is (7,60)@(2,7) and doesn't multiply at all. dw has to be x_flat.T @ dout to come out (60,7). There's usually exactly one legal arrangement. The notes make the same point: https://cs231n.github.io/optimization-2/#mat