I am getting this error on the two layer model week 4 second assignment:
Cost after iteration 1: 0.6926114346158595
Cost after first iteration: 0.693049735659989
Cost after iteration 1: 0.6915746967050506
Cost after iteration 1: 0.6915746967050506
Cost after iteration 1: 0.6915746967050506
Cost after iteration 2: 0.6899956541494738
Error: Wrong output for variable W1.
Error: Wrong output for variable b1.
Error: Wrong output for variable W2.
Error: Wrong output for variable b2.
3 Tests passed
1 Tests failed
AssertionError: Not all tests were passed for two_layer_model. Check your equations and avoid using global variables inside the function.
However, the code is working fine in the next steps and I am getting the correct values of the cost and the correct accuracy. (If the values of W and b are wrong I should not get the correct cost, no? )
Could you please help me to resolve this problem, knowing that all tests of the assignment 1 were passed (If I understand well, the functions that were developed in assignment 1 are used in the assignment 2) .
I am also getting the same error. And interestingly enough, if this model is trained on the data, it gives exactly the same accuracy as the expected output. The same thing also happens in the Exercise 2 (L layer Neural Network)
Hello @ahsanjc, thank you very much for your answer, it is also solved for me, the problem was in the “learning_rate” used when calling “update_parameters” , we should not redefine it .