Why did prateek bhaiya didn’t take 3 dimensional matrix ? because in emojifier project what we did was making a 3 dimensional matrix like (X.shape[0],any number, any number),. My Question is regarding dimension only, RNN or lstm takes embedding matrix of 3 dimensions.
LSTM Embedding matrix
hey @J20DSPP0003 ,
Actually the data is of 2 dimensions only.
Whereas while training model , a 3 dimension comes into action which is the batch size of the model.
So if your data is (10,300),
number of sentences = 10 ,
shape of embedding of a single sentence = 300.
and batch size is 32.
So while training , the input shape will be (32,10,300) and this you get it as 3 dimensions.
Hence , you just need to make it 2 dimensional and then your neural network will automatically convert it into 3 dimensional for training by adding dimension for batch size.
I hope this helps you.
.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.