Solved by vdw in post #4 
              
              
                Since you posted in nlp, I assume you work with text. 
A very common application is sentence classification (e.g., for sentence classification), where each sentence is a sequence of words. Let’s say you have a batch 3 sentences, each containing 10 words (nn.LSTM and nn.GRU require by default sequenc…