Autograd practice problems
11 problems · 0 solved
Autograd is the part of a deep learning library that computes gradients for you. Every operation is recorded as a node in a graph, and the backward pass walks that graph in reverse, applying the chain rule at each step. A good way to picture it is a receipt: the forward pass writes down every step, and the backward pass reads the receipt from the bottom up. These problems ask you to build that machinery yourself. You will write the backward pass of a matrix multiply, order a compute graph with a topological sort, run reverse mode over a tape where values are reused, route gradients through a max reduction, reduce a broadcast gradient back to the input shape, backprop through softmax without building the Jacobian, build a tiny reverse-mode engine, and make a Value class that survives very deep graphs. Start with the Easy problems on matmul backward and topological order. Then build the small engine and handle broadcasting, and finish with softmax backward and deep graphs. Understanding autograd makes you far better at debugging shape errors and wrong gradients, and it is a favourite topic in ML engineering interviews.