Hello
I am getting the error in Compute Cost in ‘Planar Data Classification’ assignment
I am getting below error
AssertionError Traceback (most recent call last)
in
3 print("cost = " + str(compute_cost(A2, t_Y)))
4
----> 5 compute_cost_test(compute_cost)
~/work/release/W3A1/public_tests.py in compute_cost_test(target)
124
125 assert type(output) == float, “Wrong type. Float expected”
→ 126 assert np.isclose(output, expected_output), f"Wrong value. Expected: {expected_output} got: {output}"
127
128 print("\033[92mAll tests passed!")
AssertionError: Wrong value. Expected: 0.5447066599017815 got: 1.0493608309109266
I used the formula
logprobs = np.multiply(np.log(A2),Y)
cost = - np.sum(logprobs)
Can someone help here?