Course 1, Week 4 Programming assignment 1 L-Model Backward

The formulas to compute dAl are different in video and in assignment.

In video:

In assignment Building_your_Deep_Neural_Network_Step_by_Step 6.3 - L-Model Backward:

To my understanding, the formula in the assignment is correct. Could anyone help to confirm?
If I made a mistake, I’m glad to know the right answer.

Thank you.

Hey @xfan, the two formulas are equivalent. In the slides, the formula is -y/a + (1-y)/(1-a). In the assignment, it is -(y/a - (1-y)/(1-a)) which simplifies to the same formula in the slides if you apply the minus operator to both terms in the bracket.

Thanks for pointing out, you are right. I got distracted by the calculus calculation and forgot the most straightforward transformation.