DLS Course 2 Wk 1 Ex 4 - gradient_check_n

I’m generating a slightly different mistake than expected:

There is a mistake in the backward propagation! difference = 2.4577112074727173e-07
Expected output :
There is a mistake in the backward propagation! difference = 0.2850931567761623

I don’t think my array indexing or variable referencing is incorrect because I worked through those errors to generate the difference
I triple checked my order of operations on both gradapprox[i] and difference calculation lines. What else am I missing?

1 Like

Hi, @mast6580.

May I suggest you check these two posts? [1] [2]

Let me know if you need more help :slight_smile:

Fixed by @mast6580. Good luck with the rest of the course!

I had the same issue producing a difference of 2.4577112074727173e-07. I had mistakenly indexed gradapprox and grad instead of using the vector.

3 Likes

Thank you! I had the same error. I was searching the forum using all other errors but not using the exact difference (number) I am getting. Finally, I realized my mistake