Hello friends,
It would be nice if someone could explain function def sample(parameters, char_to_ix, seed), specifically a(t+1) calculation. The formula is πβ¨π‘+1β©=tanh(πππ₯π₯β¨π‘+1β©+ππππβ¨π‘β©+π). As a result, in python for me it looks like a = np.tanh(np.dot(Wax, x) + np.dot(Waa, a_prev) + b). x and a_prev I initialize as x = 0, a_prev = 0. However, when I try to run the function it gives error at a(t+1) calculation saying : ValueError: operands could not be broadcast together with shapes (100,27) (100,100) . These shapes come from Wax = (100, 27), Waa = (100, 100).
It would be nice if someone could explain how we are supposed to sum up these different kind of matrices. Maybe the problem is in my formula implementation or x and a_prev initialization?
Best regards,
Roberts