I don’t think it will work exactly as in Keras, as it seems you are either still missing the second nn.LSTM.
I’m not deeply familiar with Keras, but I thought there is a Bidirectional layer, in case you want to use a bidirectional LSTM.
However, in the current Keras snippet, the two LSTM modules are piped to each other.
Could you explain a bit, how the Keras model works and how the lstms are interacting with each other?