def loss_gradients(forward_info: Dict[str, ndarray], weights: Dict[str, ndarray]) -> Dict[str, ndarray]:
'''
Compute the partial derivatives of the loss with respect to each of the parameters in the neural network.
'''
dLdP = -(forward_info['y'] - forward_info['P'])
I think this is correct:
dLdP = 2 * -(forward_info['y'] - forward_info['P'])
Or Am I missing something ?