Hi, I have the same issue, although with different values. The first cost value is correct , the second is not. I’ve checked for hard-coded values, there are none, the w,b update rules seems fine. Where else could I look? The traceback is:
w = [[0.73906337]
[2.06737855]]
b = 0.6073747140171403
dw = [[ 0.30572597]
[-0.07835381]]
db = -0.1529282379068634
Costs = [array(0.15900538)]
AssertionError Traceback (most recent call last)
in
7 print("Costs = " + str(costs))
8
----> 9 optimize_test(optimize)
~/work/release/W2A2/public_tests.py in optimize_test(target)
73 assert type(costs) == list, “Wrong type for costs. It must be a list”
74 assert len(costs) == 2, f"Wrong length for costs. {len(costs)} != 2"
—> 75 assert np.allclose(costs, expected_cost), f"Wrong values for costs. {costs} != {expected_cost}"
76
77 assert type(grads[‘dw’]) == np.ndarray, f"Wrong type for grads[‘dw’]. {type(grads[‘dw’])} != np.ndarray"
AssertionError: Wrong values for costs. [array(5.80154532), array(0.58923175)] != [5.80154532, 0.31057104]