deep-learning-v2-pytorch icon indicating copy to clipboard operation
deep-learning-v2-pytorch copied to clipboard

Introduction to neural networks: 35. Notebook: Analyzing Student Data: error_term_formula solution

Open scmanjarrez opened this issue 2 years ago • 0 comments

Why you multiply the sigmoid_prime(x) by x? You defined backpropagation error as (𝑦−𝑦̂)𝜎′(𝑥) in the notebook: Your solution:

def error_term_formula(x, y, output):
#    for binary cross entropy loss
    return (y - output)*x
#    for mean square error
#    return (y - output)*sigmoid_prime(x)*x

Notebook definition:

TODO: Backpropagate the error

Now it's your turn to shine. Write the error term. Remember that this is given by the equation
(𝑦−𝑦̂)𝜎′(𝑥)

You even had (y - output)*sigmoid_prime(x) as the solution, but then you changed it to (y - output)*sigmoid_prime(x)*x in this commit

scmanjarrez avatar Feb 28 '23 13:02 scmanjarrez