please for support, the error show that a and p should be same size .
In this case, ‘a’ represents the vocab range.
As Tom says, a there just means the size of the first argument, which is vocab_size.
Then p will have the same size as your y array. So fundamentally this means that the y value you have computed is the wrong size. So what size is it?
I added some print statements to my logic in that section and here’s what I see:
vocab_size = 27
Wax (100, 27) dot (27, 1) + Waa (100, 100) dot a_prev (100, 1)
Wya (27, 100) dot (100, 1) + by (27, 1)
y.shape (27, 1)
len(y) 27
What do you see when you examine the sizes of those objects?
Hi Paul,
How are you, thank for your hint i print all the shapes as you did and i found my issue but im trying to fix it now .I have y shape is wrong PFB:
Thank you but i want to check why y in my formula having different y shape which shared in Paul msg
I found the issue ,it was in this line    x  = np.zeros((vocab_size,))
I just added 1 as pram so    x  = np.zeros((vocab_size,1))
so in loop the shape will be static and not increase after 2nd iteration ..
Thank for all
It’s great that you found the issue. Thanks for closing the loop and explaining the solution. Yes, we need 2D objects for everything here. The rules for what happens when you take the dot product of a 2D object with a 1D object give incorrect results for our purposes here.

