Course2, Week1, Exercise 3 - Gradient check

Hi,

I’m having trouble with Exercise 3 - graidient check
My output:
There is a mistake in the backward propagation! difference = 0.6000000001868375
I’ve browsed the forums and my output is identical similar to this poster:

I have checked the suggestion of j_plus and j_minus.
For both J, I used roughly
forward_prop * theta plus/minus

I’ve also checked the precedence of brackets for gradapprox, based on the formula:
j-plus - j-minus divided by in brackets, 2 * epsilon.

Any help would be appreciated, thanks!

I’m a little worried by your description of how you computed J_plus and J_minus: there is no multiplication involved, right? You just call forward propagation with the appropriate arguments.

Of course there’s another place things could be wrong: in the computation of back propagation and the difference ratio.

Wow, thanks a lot! I can’t believe I missed that. For some reason I saw J(theta) as J * theta. A fresh set of eyes and maybe a break could have solved that. Got it running now! Thanks again for the quick reply.

Cool! Glad to hear it was an easy fix. Onward! :nerd_face: