Hi.
I am trying to learn how to implement seq2seq model in Pytorch.
I have 2 questions:


How to encode sentences? Suppose, I have a sentence “Lionel plays football.”. How to represent this sentence as tensor? Will this sentence be represented as a vector of length vocab_size, with 0 and 1 entries? Where does seq_length come in lstm input?


I am having trouble in the decoding part of the seq2seq model. How to pass both the encoder’s hidden state as well the target ouput in the seq2seq decoder? Once, I define a LSTM as my decoder, how do I get a sequence as output?


Cheers!