NumPy allowed · plain Python earns 10 bonus points
θ ← θ − 0.14 · ∂L/∂θ
Compute the analytical gradient of Mean Squared Error loss w.r.t network predictions to initiate backpropagation.
Implement mse_loss_backward(y_pred, y_true): with MSE = (1 / (N * D)) * sum((y_pred - y_true)^2), compute the derivative with respect to each prediction y_pred[i][j], which is (2 / (N * D)) * (y_pred[i][j] - y_true[i][j]). Here N is the number of rows and D is the number of columns. Round each gradient element to 4 decimal places.
mse_loss_backward(y_pred: list[list[float]], y_true: list[list[float]]) -> list[list[float]]