I don’t think so. In Keras, there is a max length parameter, but not in PyTorch. TO my knowledge, what you are suggesting is unnecessary. Sequence lengths need be equal only for mini-batches, not the entire batch