Hello here , After completing the model-forward function , I’m getting this specific error (below) ,
*is there anything i’m getting wrong or missing? according to the error , the matrix multiplication rule won’t work for w times A , how to do i go about this? *
Your guidance will be much appreciated
ValueError Traceback (most recent call last)
in
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
in L_model_forward(X, parameters)
27 # caches …
28 # YOUR CODE STARTS HERE
—> 29 A , cache = linear_activation_forward(X, parameters[‘W’+str(l)] , parameters[‘b’ + str(l)] , activation =“relu” )
30 caches.append(cache )
31
in linear_activation_forward(A_prev, W, b, activation)
31 # A, activation_cache = …
32 # YOUR CODE STARTS HERE
—> 33 Z , linear_cache = linear_forward(A_prev, W ,b)
34 A , activation_cache = relu(Z)
35
in linear_forward(A, W, b)
19 # YOUR CODE STARTS HERE
20
—> 21 Z = np.dot( W, A) + b
22
23 # YOUR CODE ENDS HERE
<array_function internals> in dot(*args, **kwargs)
ValueError: shapes (3,4) and (5,4) not aligned: 4 (dim 1) != 5 (dim 0)