Week 1 ,assignment 3

How can I solve this error?

I have the very same problem and so far could not figure out why.

Hi, @aatorrano.

That error most likely means there’s a problem in your code. Double-check it and let me know if you can’t find the problem.

@Hale has already fixed it.

As a tip to other learners, be careful with operator precedence (when in doubt, use parentheses) and pay attention to the difference between numpy.random.rand and numpy.random.randn.

Good luck with the rest of the course, @aatorrano!


Edited: found it, my grad_approx line was wrong, silly me! I’ll leave this post here in case anyone else has the same problem.

I have the same error, did you have any luck finding out what went wrong?

My output is:
There is a mistake in the backward propagation! difference = 0.6623181774407311
Error: Wrong output
0 Tests passed
1 Tests failed

I am glad you were also able to find the problem!
Best regards