in rnn_cell_forward(xt, a_prev, parameters)
30 ### START CODE HERE ### (≈2 lines)
31 # compute next activation state using the formula given above
—> 32 a_next = np.tanh(np.dot(Waa, a_prev) + np.dot(Wax, xt)+ba)
33 # compute output of the current cell using the formula given above
34 yt_pred = softmax(np.dot(Wya, a_next) + by)
<array_function internals> in dot(*args, **kwargs)
ValueError: shapes (5,3) and (3,10,4) not aligned: 3 (dim 1) != 10 (dim 1)
It looks like you have modified that test cell. It does not look like that in my copy of the notebook. Here’s what I see for the line that invokes rnn_cell_forward:
See the difference? In your case the first and second arguments are different. So how did that happen? Just generally speaking it’s not a good idea to modify the test code. If the test fails, the solution is not to change the test: it is to figure out why your code fails the test.
If you want to get a clean copy of the notebook and start over, there is a topic about that on the FAQ Thread.
I am receiving the error from the rnn_forward test block not the rnn_cell_forward block. The parameters being passed are actually correct in this case. Please see below. Thanks for help!
Hey @Eric_Brazell, I guess there is a small confusion. In the screenshot you have attached above, it is for the test block of rnn_cell_forward only. Even in your error that you initiated your post with, it is mentioned rnn_cell_forward. Can you please confirm this? Because if this is for the rnn_cell_forward, then it differs from what we can see in our copy of the notebook.
Glad to hear you found the answer. Note that in all the images you posted the function being call is notrnn_forward but rnn_cell_forward. Apparently some wires were crossed somewhere.