Solved by ptrblck in post #5 
              
              
                That might be the case and I agree that something else might create the issue. 
In the Keras implementation you are using return_sequences=False. 
Based on the docs, it seems that this LSTM will only return the output of the last timestep. 
In your PyTorch implementation you are reshaping the outpu…