Week 2 Assignment 4.3 - propagate function gives assert error despite apparently correct answer

I am getting values that match the expected answer, but still receive assertion errors.


dw = [[0.99845601]
db = 0.001455578136784208
cost = -5.801545319394553
AssertionError                            Traceback (most recent call last)
<ipython-input-107-be03942b69a5> in <module>
     14 print ("cost = " + str(cost))
---> 16 propagate_test(propagate)

~/work/release/W2A2/public_tests.py in propagate_test(target)
     39     assert np.allclose(grads['dw'], expected_dw), f"Wrong values for grads['dw']. {grads['dw']} != {expected_dw}"
     40     assert np.allclose(grads['db'], expected_db), f"Wrong values for grads['db']. {grads['db']} != {expected_db}"
---> 41     assert np.allclose(cost, expected_cost), f"Wrong values for cost. {cost} != {expected_cost}"
     42     print('\033[92mAll tests passed!')

AssertionError: Wrong values for cost. -5.801545319394553 != 5.80154531

I can’t spot an error, and I also did add a cell to print out stuff, and then cut it out to get rid of it. Since then I’ve closed the notebook and opened it a few times but I still get the error.

I’d be grateful for any assistance

hello mentors and fellow students! Is there any way for me to fix this? My answer matches the “Expected answer” but I get an assert saying: AssertionError: Wrong values for cost. -5.801545319394553 != 5.80154531

Meanwhile the expected answer matches the answer I produced:
My answer:
dw = [[0.99845601]
db = 0.001455578136784208
cost = -5.801545319394553

Expected output

dw = [[0.99845601]
db = 0.001455578136784208
cost = 5.801545319394553

Dear @zaks from the information you attached here it seems that the cost is negative 5.8 instead of positive 5.8, hope this helps

thank you - silly of me!