4 hidden checks

Implement the backward rules for a dense layer and a ReLU. The hidden checks compare your gradients with numerical ones.

  • dense_backward(X, W, dY): for the forward pass Y = X @ W + b, return (dX, dW, db) given the upstream gradient dY.
  • relu_backward(Z, dA): for A = relu(Z), return dZ.
checks
  • shapes match the forward passnot run
  • dense gradients match numerical gradientsnot run
  • relu_backward gates the gradientnot run
  • a two-layer backward pass is correct end to endnot run
python sleeps until you press run

Press Run & check. Your code runs first, then the hidden checks on the left.