Week 2 assignment Ex.8 problem

I pass all examples from 1 to 7, But on Ex.8 I have an error and i didn’t find what is it

Notice that your cost values are wrong (although there’s a bug in the printed message that goes along with that). If your optimize code and propagate already pass the earlier tests, then the problem is probably that you are over-riding the value of the number of iterations or learning rate when you call optimize from model. There should not be any “param = value” statements in the argument list you pass to optimize. If there are, it means you are ignoring the actual values passed into model at the top level.

1 Like

I am facing a similar issue. And as you said, my optimize function doesn’t override any parameter value given at the top level. Yet, I am constantly getting the following assertion error:
“AssertionError: Wrong values for d[‘Y_prediction_test’]. [[0. 0. 0. 0. 0. 0.]] != [[1. 1. 1. 1. 1. 1.]]”

If you’re sure that your predict function passes the tests in that section, then it must be that you are calling predict with incorrect arguments.

Hello, Paulinpaloalto!
I just rechecked my helper functions and I spotted an error inside “predict” function. Somehow I had passed incorrect expression for activation function. I am embarrassed. Nonetheless, I am surprised that the prediction test was successful previously.
Thank you for your feedback though!