There is a mistake in the backward propagation! difference = 0.17344196893145924
AssertionError: Wrong value. It is not one of the expected values
What to do, I have no idea.
{moderator edit - solution code removed}
There is a mistake in the backward propagation! difference = 0.17344196893145924
AssertionError: Wrong value. It is not one of the expected values
What to do, I have no idea.
{moderator edit - solution code removed}
Your code seems correct to me. Try making (2*epsilon)
in the calculation of gradapprox[i]
float. Use np.float
.
I agree the code looks correct. epsilon
is already a float, so the type coercion rules should handle 2 * epsilon
just fine.
I can think of two theories: