LSTM variable sequence length

You can check out this post. You can either pad all shorter sequence in batch, or ensure that each batch contains only sequences of the same length – or a combination of both approaches.