Solved by ptrblck in post #3 
              
              
                I think you are mixing up in_transform and forget_gate. This code should work and I’ve also added my manual implementation, which basically just reuses the formulas from the docs: 
# nn.LSTM 
torch.manual_seed(20)
lstm_official = torch.nn.LSTM(6, 2, bidirectional=False, num_layers=1, batch_first=Fal…