Building_your_Deep_Neural_Network_Step_by_Step - C1W4

Hello! Im having problems with the ex 10, this is mi code

W1 = [[-0.59562069 -0.09991781 -2.14584584  1.82662008]
 [-1.76569676 -0.80627147  0.51115557 -1.18258802]
 [-1.0535704  -0.86128581  0.68284052  2.20374577]]
b1 = [[-0.04659241]
 [-1.28888275]
 [ 0.53405496]]
W2 = [[-0.55569196  0.0354055   1.32964895]]
b2 = [[-0.84610769]]
Error: Wrong output for variable W1.
Error: Wrong output for variable b1.
Error: Wrong output for variable W2.
Error: Wrong output for variable b2.
 2  Tests passed
 1  Tests failed
---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
<ipython-input-29-e0da3f3aab9d> in <module>
      7 print ("b2 = "+ str(t_parameters["b2"]))
      8 
----> 9 update_parameters_test(update_parameters)

~/work/release/W4A1/public_tests.py in update_parameters_test(target)
    578     ]
    579     #print(target(*test_cases[2]["input"]))
--> 580     multiple_test(test_cases, target)
    581 
    582 

~/work/release/W4A1/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 update_parameters. Check your equations and avoid using global variables inside the function.

Your code is missing an important line:
image

Did you delete it?

And again, please don’t post your code on the forum. Thanks!

After you fix that, you’ll need to re-run all of the cells in the notebook.

That’s because your code (without the deepcopy() line) was modifying a global variable from the workspace. That’s bad.