Assertion Error in W4 Assignment L_Layer Models

Hi guys, I keep encountering this error, and I have spent so long trying to solve it. If anyone has any ideas, please let me know. This is for the Week 4 Deep Neural Network Assignment.

Cost after first iteration: 0.6931477726958
Error: Wrong output for variable W1.
Error: Wrong output for variable b1.
Error: Wrong output for variable W2.
Error: Wrong output for variable b2.
Error: Wrong output for variable W3.
Error: Wrong output for variable b3.
Error: Wrong output for variable 0.
Error: Wrong output for variable W1.
Error: Wrong output for variable b1.
Error: Wrong output for variable W2.
Error: Wrong output for variable b2.
Error: Wrong output for variable W3.
Error: Wrong output for variable b3.
Error: Wrong output for variable 0.
2 Tests passed
2 Tests failed

AssertionError Traceback (most recent call last)
in
3 print("Cost after first iteration: " + str(costs[0]))
4
----> 5 L_layer_model_test(L_layer_model)

~/work/release/W4A2/public_tests.py in L_layer_model_test(target)
181 ]
182
→ 183 multiple_test(test_cases, target)

~/work/release/W4A2/test_utils.py in multiple_test(test_cases, target)
140 print(‘\033[92m’, success," Tests passed")
141 print(‘\033[91m’, len(test_cases) - success, " Tests failed")
→ 142 raise AssertionError(“Not all tests were passed for {}. Check your equations and avoid using global variables inside the function.”.format(target.name))
143

AssertionError: Not all tests were passed for L_layer_model. Check your equations and avoid using global variables inside the function.
`

Are you sure that you did not manually import your version of the initialization function from the previous Step by Step exercise? They gave you the functions from the previous assignment as imports here and they had to use a more sophisticated initialization algorithm that won’t be covered until DLS Course 2 in order to get reasonable convergence on this model.

1 Like

omg yes, i totally misunderstood the question. i may have been too tired. and i totally forgot that the assignment only requires us to fill up the sections where it explicitly mentions to fill up, thank you so much!

1 Like