Solved by ptrblck in post #2 
              
              
                Your current code throws an error, if I pass an input of shape [50, 256] to it in the self.lstm layer. 
For the batch_first=True argument, the input should be [batch_size, seq, feature], so just passing embeds without the view gets rid of this error. 
If you would like to use the output features of …