Rewrite model from Keras to Pytorch

Greetings, I’ve posted a strange behavior that I’m facing when converting one model from Keras to Pytorch, but it seems that community here is much greater and as I got no response there I’ll post it here also (ref. to Original post).

Summarizing:
I’m converting a basic LSTM many-to-one architecture to predict the next single element in a sequence, written in Keras to Pytorch. Running both models with the same data (yes, I’ve explicitly checked that), both start with a loss value ~ 4, but after 100 epochs or so, Keras already reached a loss ~ 0.02, which gives the desired results.

1 Like