LSTM gives same output for any input

LSTM returns same output for any input. My model architecture is like this:
(encoder): Embedding(V, D)
(lstm): LSTM(D, H, bidirectional=True)
(decoder_start): Linear(in_features=H, out_features=O, bias=True)
(decoder_end): Linear(in_features=H, out_features=O, bias=True)
the LSTM output at the last time step is taken as:
lstm_op dims: [N, T, 2*H]
start = lstm_op[:, -1, :H] # forward
end = lstm_op[:, -1, H:] # backward
Am I correct in assuming that the above returns output after forward LSTM has seen the last input in the sequence, and the backward LSTM has seen the first?
I believe it is not learning anything significant, even though loss decreases (using log_softmax + NLLLoss).

2 Likes