Checkpoint
Derivatives, gradients and Jacobians
Eleven questions on the whole module: derivatives and their rules, gradients, Jacobians and the chain rule, and gradient descent. The numbers are new, and several options are the classic mistakes. Work on paper where it helps; the code item is short. You need 80 percent to pass.
- 1
What is the derivative of at , where is the sigmoid?
h'(0) - 2
You check a derivative of a smooth function with a central difference. With the estimate is off by . Ignoring rounding error, about how far off will it be with ?
error with h = 0.05 - 3
A pre-activation passes through either a sigmoid unit or a tanh unit, and the upstream gradient is . How much gradient does each unit pass back to ?
- 4
The loss on one example is with and . Find at .
∇L at w = (1, 1) - 5
At a point, . You take a small step in the unit direction . To first order in the step (the linear approximation), what happens to ?
- 6
A feed-forward block maps a 768-entry vector up to 3,072 entries with its first layer (Jacobian ), then back down to 768 with its second (Jacobian ). What is the Jacobian of the whole block?
- 7
Let , with ReLU applied to each entry and . Find the Jacobian of at .
Jacobian at (-1, 1) - 8
Three logits are equal: . For , what is ? Give a fraction or 3 decimal places.
∂p₁/∂z₂ - 9
Gradient descent on starts at with learning rate . What is ?
w₂ - 10
Near a minimum, the Hessian has eigenvalues and . You run gradient descent with . What happens?
- 11
Code it Write
input_grad(W1, W2, x): the gradient with respect toxof . Use vector-Jacobian products only: never build a Jacobian.