Hi all,
I have been checking manually the dimensions and it sounds right to me, yet I am getting the below error: also how can I check each vector shape? I mean where would I put the code?
ValueError Traceback (most recent call last)
<ipython-input-159-10fc901e800a> in <module>
1 t_X, t_parameters = L_model_forward_test_case_2hidden()
----> 2 t_AL, t_caches = L_model_forward(t_X, t_parameters)
3
4 print("AL = " + str(t_AL))
5
<ipython-input-158-cfe68e945af9> in L_model_forward(X, parameters)
28 # YOUR CODE STARTS HERE
29
---> 30 A, cache = linear_activation_forward(X, parameters["W"+str(l)], parameters["b"+str(l)], activation = "relu")
31
32 caches.append(cache)
<ipython-input-125-1980cedde44f> in linear_activation_forward(A_prev, W, b, activation)
35 # YOUR CODE STARTS HERE
36
---> 37 Z, linear_cache = linear_forward(A_prev, W, b)
38
39 A, activation_cache = relu(Z)
<ipython-input-123-0e4ecaaa6191> in linear_forward(A, W, b)
19 # YOUR CODE STARTS HERE
20
---> 21 Z= np.dot(W, A)+ b
22
23
<__array_function__ internals> in dot(*args, **kwargs)
ValueError: shapes (3,4) and (5,4) not aligned: 4 (dim 1) != 5 (dim 0)