Hello Team,
I have received following Value Error in Course 1 Week 4 Exercise 9:
ValueError Traceback (most recent call last)
in
1 t_AL, t_Y_assess, t_caches = L_model_backward_test_case()
----> 2 grads = L_model_backward(t_AL, t_Y_assess, t_caches)
3
4 print("dA0 = " + str(grads[‘dA0’]))
5 print("dA1 = " + str(grads[‘dA1’]))
in L_model_backward(AL, Y, caches)
47 # YOUR CODE STARTS HERE
48 current_cache = caches[L-1]
—> 49 dA_prev_temp, dW_temp, db_temp = linear_backward(dAL,current_cache)
50 grads[“dA” + str(L-1)] = dA_prev_temp
51 grads[“dW” + str(L)] = dW_temp
in linear_backward(dZ, cache)
14 db – Gradient of the cost with respect to b (current layer l), same shape as b
15 “”"
—> 16 A_prev, W, b = cache
17 m = A_prev.shape[1]
18 #print(dZ)
ValueError: not enough values to unpack (expected 3, got 2)
In the code snippet the length = 2 (Variable L) which is equal to length of “caches”
I am passing current_cache parameter to function linear_backward(dAL,current_cache) where current_cache = caches[L-1]
i tried to resolve this error but unfortunately not succeed.
Any help is much appreciated.
Thanks in advance.
Abhay