Deep learning Image Classification. Grade is 0. No actual errors

Deep learning Image Classification
Grade is 0. No actual errors. Still shows 3 test cases failed without exactly telling which test cases failed.

Grads:{‘dA1’: array([[-0.16657924, -0.17141694, 0.17854656, …, -0.1477705 ,
-0.17030763, -0.15394325],
[ 0.51278909, 0.52768123, -0.54962867, …, 0.45488922,
0.52426639, 0.47389109],
[ 0.02820137, 0.02902038, -0.03022741, …, 0.02501711,
0.02883258, 0.02606214],
…,
[-0.00087505, -0.00090046, 0.00093792, …, -0.00077625,
-0.00089464, -0.00080867],
[ 0.3056764 , 0.31455369, -0.32763668, …, 0.27116197,
0.31251809, 0.28248909],
[-0.05662922, -0.05827381, 0.06069755, …, -0.05023512,
-0.0578967 , -0.05233357]]), ‘dW2’: array([[0.06343729, 0.02411816, 0.01929837, 0.00483896, 0.04823448,
0.00010084, 0.02218976]]), ‘db2’: array([[0.13056702]]), ‘dA0’: array([[ 3.25853922e-04, 3.35317194e-04, -2.00077776e-03, …,
-2.48557714e-03, 2.18739533e-03, -2.58940600e-03],
[ 5.88471627e-05, 6.05561699e-05, -6.85673570e-04, …,
-3.75888461e-04, 1.96623344e-03, -3.91590274e-04],
[ 1.65833963e-03, 1.70650022e-03, 1.68530441e-03, …,
1.33038858e-03, -2.15320398e-03, 1.38596228e-03],
…,
[ 3.06061082e-03, 3.14949541e-03, -3.30532924e-03, …,
-9.53150570e-05, 4.28366233e-03, -9.92966085e-05],
[ 6.57963966e-03, 6.77072196e-03, 1.38447267e-03, …,
8.58047222e-04, -1.76065901e-03, 8.93890029e-04],
[-9.05364286e-04, -9.31657383e-04, 8.68665167e-04, …,
-1.57088072e-03, -6.40663313e-04, -1.63650039e-03]]), ‘dW1’: array([[-1.27133757e-02, -1.73555845e-02, -1.26016793e-02, …,
-1.31522293e-02, -1.67860968e-02, -7.68381384e-03],
[ 3.17736909e-02, 3.93412178e-02, 2.72695871e-02, …,
3.29202678e-02, 4.18709610e-02, 2.31201611e-02],
[ 1.13081230e-03, 1.61194246e-03, 1.02994363e-03, …,
1.66358174e-03, 1.99333774e-03, 9.36556978e-04],
…,
[-6.42208258e-05, -9.04599096e-05, -6.35047249e-05, …,
-7.15117050e-05, -8.93806098e-05, -4.27711213e-05],
[ 1.87285057e-04, 8.48327433e-04, 8.41871694e-04, …,
2.32900241e-04, 3.38570011e-04, 4.33057660e-04],
[-3.23536660e-03, -4.82717328e-03, -3.63782826e-03, …,
-4.13060799e-03, -5.41186426e-03, -2.24507581e-03]]), ‘db1’: array([[-0.04194665],
[ 0.09484513],
[ 0.00443241],
[ 0.03289843],
[-0.0002138 ],
[ 0.00284217],
[-0.01189075]])}
Parameters:{‘W1’: array([[ 0.01474873, -0.00538855, -0.00467018, …, -0.00465741,
-0.00330519, 0.00862237],
[ 0.00886607, 0.00177879, -0.00619542, …, 0.00597638,
-0.00471923, 0.00169947],
[-0.00322306, -0.00177554, 0.00573694, …, 0.00740964,
-0.00095698, -0.00594252],
…,
[-0.00284475, 0.01123582, -0.01176838, …, 0.00333948,
0.00932106, -0.00808298],
[ 0.00440011, 0.00315155, -0.00077084, …, -0.00504708,
0.00292952, 0.0020845 ],
[ 0.0048422 , 0.02270071, -0.00939755, …, 0.01956328,
-0.0075604 , 0.00326258]]), ‘b1’: array([[ 3.14599907e-04],
[-7.11338478e-04],
[-3.32430558e-05],
[-2.46738220e-04],
[ 1.60353042e-06],
[-2.13162593e-05],
[ 8.91806563e-05]]), ‘W2’: array([[-0.32299532, 0.99264695, 0.05445687, 1.06424421, -0.00205597,
0.59182938, -0.10980811]]), ‘b2’: array([[-0.00097925]])}
Cost after iteration 0: 0.695046
Cost:0.6950464961800915
Cost after first iteration: 0.6950464961800915

Cost after iteration 1: 0.707071
Cost:0.7070709008912569
Cost after iteration 1: 0.707071
Cost:0.7070709008912569

Cost after iteration 0: 0.707239
Cost:0.707239437483742

     0.04648216]]), 'b3': array([[0.00525865]])}

Cost after iteration 2: 0.706346
Cost:0.7063462654190897
1 Tests passed
3 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)

If I print

Test Case 1:

Test Case 2:

Maybe check your L model for any mistakes.

Issue is in the public_tests.py
please fix X, Y

Have you tried

Sometimes your files become outdated when we update assignments and then you need to get updated test files.

Thank You very much. It has worked

1 Like