{moderator edit - solution code removed}
AssertionError Traceback (most recent call last)
<ipython-input-107-9408a3dffbf6> in <module>
1 from public_tests import *
2
----> 3 model_test(model)
~/work/release/W2A2/public_tests.py in model_test(target)
141 assert type(d['Y_prediction_train']) == np.ndarray, f"Wrong type for d['Y_prediction_train']. {type(d['Y_prediction_train'])} != np.ndarray"
142 assert d['Y_prediction_train'].shape == (1, X.shape[1]), f"Wrong shape for d['Y_prediction_train']. {d['Y_prediction_train'].shape} != {(1, X.shape[1])}"
--> 143 assert np.allclose(d['Y_prediction_train'], expected_output['Y_prediction_train']), f"Wrong values for d['Y_prediction_train']. {d['Y_prediction_train']} != {expected_output['Y_prediction_train']}"
144
145 print('\033[92mAll tests passed!')
AssertionError: Wrong values for d['Y_prediction_train']. [[1. 0. 1. 1. 1. 0. 1.]] != [[1. 1. 0. 1. 0. 0. 1.]]
hi, I’m encountering this problem and have no idea how to fix it. Previous exercises’ tests have all passed but for this one I think I’m writing it correctly but still got the training wrong. I’d really appreciate if anyone could help this out. Thanks!