Week 1 Gradient checking issue

Please Correct my mistake in the below code:-

{moderator edit - solution code removed}

My O/P: There is a mistake in the backward propagation! difference = 2.4577112074727173e-07

And it shows wrong value error. Please help!

Note that when you compute the final overall difference after the loop over the elements, it is supposed to use the complete vector, but you are using just one element.

Also please note that the rules here are that we can’t show solution code in a public way, even if it is incorrect. Please just show us the failing test output that you get. If we can’t figure out how to offer advice based on that, then there are private ways for the mentors to look at your code and we will ask you for that if needed.

I’m sorry for it. Thank you, i will try to correct