harshraj22:

In case of encoder, during the forward propagation, we send a batch of sentences, and for each sentence, word_i is passed as input to LstmCell_i.


This isn’t how forward prop of an LSTM works. The word is always passed into LstmCell_0, then the output of LstmCell_0 goes into LstmCell_1, etc.