Hi @ptrblck.
Thanks for the reply. Sorry, I forgot to mention my batch size which is 20. Yeah, I am expecting an final output of [batch_size, 1], one output for each sequence.
However, I seem to be getting an output of shape, [batch_size, seq_len, 1] ~ (20, 5, 1).
This is what I have been doing.
out, _ = lstm(input)
out = linear(out)

Is there something I am doing wrong? Or is [batch_size, seq_len, 1] is the expected output size here?