Solved by ptrblck in post #3 
              
              
                I guess the issue could be created by the nn.LSTM layer in the default setup, which would expect an input in the shape [seq_len, batch_size, nb_features] and could thus process the inputs in a wrong way. 
If you want to pass inputs with the batch dimension in dim0, you could create the modules with b…