Grad instead of gradients in function description

In Gradient Checking assignment in the code for Ex. 4 we can see that commented function description refers not to “grad” variable but to function argument “gradients”.

Sorry, I do not quite understand your question.

There is no requirement that the variable names in the code be identical to the symbols used in the math equation.

I mean that you can see red colored description “grad – output of backward_propagation_n, …” but the actual name of the argument passed into function gradient_check_n is “gradients”. So, as far as I can tell, red colored “grad” should be replaced with red colored “gradients”.

I agree. That is probably a simple typo, since the variable name is gradients. The name in the doctext should also be “gradients”.

1 Like