I decided to venture into NLP in machine learning after giving it some thoughts, so I am curious as to how the encoder and decoder of a simple seq2seq model works, precisely I want to know how data is fed into the encoder and decoder give that the input data is of shape (batch_size, input_len),  output of shape (batch_size, output_len), the text is vectorized with it’s unique token index from the vocabulary eg: (vocab:{’’:0, ‘’:1, ‘’:2, ‘’:3,…}, vectorized_text(‘i am …’): [1, 6, 33, 4…2, 0, 0, 0, 0]) and the RNN layer has batch_first = True.
Thanks to anyone who answers this.