Hi, I am not sure why I’m getting the error below. I am using A_prev in the loop and A for the output layer. I went back and checked the sizes of the matrices, but can’t see why AL is in the wrong shape. Thanks in advance. Here is what I’m getting:
AL = (array([[0.03921668, 0.70498921, 0.19734387, 0.04728177]]), ((array([[ 2.2644603 , 1.09971298, 0. , 1.54036335],
[ 6.33722569, 0. , 0. , 4.48582383],
[10.37508342, 0. , 1.63635185, 8.17870169]]), array([[ 0.9398248 , 0.42628539, -0.75815703]]), array([[-0.16236698]])), array([[-3.19864676, 0.87117055, -1.40297864, -3.00319435]])))
Error: Wrong shape for variable 0.
Error: Wrong shape for variable 0.
Error: Wrong shape for variable 1.
Error: Wrong shape for variable 2.
Error: Wrong shape for variable 1.
Error: Wrong output for variable 0.
Error: Wrong output for variable 0.
Error: Wrong output for variable 1.
Error: Wrong output for variable 2.
Error: Wrong output for variable 1.
0 Tests passed
3 Tests failed
AssertionError Traceback (most recent call last)
in
4 print("AL = " + str(t_AL))
5
----> 6 L_model_forward_test(L_model_forward)
~/work/release/W4A1/public_tests.py in L_model_forward_test(target)
238 ]
239
→ 240 multiple_test(test_cases, target)
241 ‘’’ {
242 “name”:“datatype_check”,
~/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 L_model_forward. Check your equations and avoid using global variables inside the function.