I am confused as to put what in the parameters for w,b for the last layer using sigmoid.
I am getting the following error:
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)
36 # caches …
37 # YOUR CODE STARTS HERE
—> 38 AL,cache=linear_activation_forward(A_prev, parameters[‘W’ + str(L)], parameters[‘b’+str(L)], activation=“sigmoid”)
39 caches.append(cache)
40 # YOUR CODE ENDS HERE
in linear_activation_forward(A_prev, W, b, activation)
22 # A, activation_cache = …
23 # YOUR CODE STARTS HERE
—> 24 Z,linear_cache=linear_forward(A_prev, W, b)
25 A,activation_cache=sigmoid(Z)
26 # YOUR CODE ENDS HERE
in linear_forward(A, W, b)
18 # Z = …
19 # YOUR CODE STARTS HERE
—> 20 Z=np.dot(W,A)+b
21
22 # YOUR CODE ENDS HERE
<array_function internals> in dot(*args, **kwargs)
ValueError: shapes (1,3) and (4,4) not aligned: 3 (dim 1) != 4 (dim 0)