Hello,
in the function lstm_cell_forward I stuck at the concatenate of a_prev and xt.
The shape of a_prev is (5, 10) and of xt (3, 10).
If I specify the axis to 0, the following error message appears:
ValueError: shapes (5,10) and (5,10) not aligned: 10 (dim 1) != 5 (dim 0)
With axis to 1:
ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 0, the array at index 0 has size 5 and the array at index 1 has size 3
Hi Kic, I am already concatenating a_prev with xt and using the concatenated matrix for gate calculation but still getting error ValueError: shapes (5,10) and (5,10) not aligned: 10 (dim 1) != 5 (dim 0)
Thank you for your prompt response. Appreciate it.
I figured out what was the issue. Actually, I was using np.dot to multiple forget gate with c_prev and also to multiply update gate with cct. It has to be elementwise multiplication(*) as dimensions of matrices are same. I referred one of the blog posts that showed implementation of LSTM from scratch using numpy and that gave me clue.
Thank you for your support.