Week 1 Assignment 3 Exercise 4

I keep getting this error for this exercise:

There is a mistake in the backward propagation! difference = 0.7697371879394878

AssertionError Traceback (most recent call last)
6 expected_values = [0.2850931567761623, 1.1890913024229996e-07]
7 assert not(type(difference) == np.ndarray), “You are not using np.linalg.norm for numerator or denominator”
----> 8 assert np.any(np.isclose(difference, expected_values)), “Wrong value. It is not one of the expected values”

AssertionError: Wrong value. It is not one of the expected values

I have even fixed the backpropagation function errors, but I keep getting this error for some reason.

Can someone please help?

The logic for computing theta_plus and theta_minus is incorrect. Remember that those are each vectors with num_parameters entries, right? So if you say this:

theta_plus = theta_plus + epsilon

where epsilon is a scalar, that means you are adding epsilon to every element in that vector. That is not what is intended here.