Solved by ptrblck in post #2 
              
              
                You could pass the time steps one by one instead of the complete batch in these lines of code: 
lstm_out, self.hidden = self.basic_rnn(X, self.hidden) # apply loop here
out = self.FC(self.hidden)

Note that you could pass each row to the linear layer to get the logits, but this would change your mod…