Skip to content

calculation of dLdP in 02_fundamentals/Code.ipynb is incorrect. #20

@Pranjalpok7

Description

@Pranjalpok7

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions