Wrong Cost output C1_W2

AssertionError Traceback (most recent call last)
1 from public_tests import *
----> 3 model_test(model)

~/work/release/W2A2/public_tests.py in model_test(target)
127 assert type(d[‘costs’]) == list, f"Wrong type for d[‘costs’]. {type(d[‘costs’])} != list"
128 assert len(d[‘costs’]) == 1, f"Wrong length for d[‘costs’]. {len(d[‘costs’])} != 1"
→ 129 assert np.allclose(d[‘costs’], expected_output[‘costs’]), f"Wrong values for d[‘costs’]. {d[‘costs’]} != {expected_output[‘costs’]}"
131 assert type(d[‘w’]) == np.ndarray, f"Wrong type for d[‘w’]. {type(d[‘w’])} != np.ndarray"

AssertionError: Wrong values for d[‘costs’]. [array(0.15900538)] != [array(0.69314718)]

Getting this error cant figure out whats is wrong with the propogate function

1 Like

Why do you feel the problem is with the propagate() function?

Thank you for the response I figured out the problem was with the optimize function and the learning_rate and no of iterations had to be passed as arguments to it.