You could use the last time step of the LSTM output or alternatively try to reduce the temporal dimension e.g. with a pooling layer.
Also note, that you are not using any non-linearities between the linear layers at the moment.
I’m not sure which criterion you are using, but if you are using nn.CrossEntropyLoss, you should also remove the last softmax operation.