So If I understand correctly seq_len does not necesarily vary but len can vary and you know this ahead of time. I think it depends on the task: Is there some kind of termination criterion in your task? In language, for example, we predict discrete tokens, and have a special termination token, which, if it is generated, terminates the sequence, but we still use a maximum sequence length as I described above and pad the predictions that go over the limit given by your ‘len’ or the termination token.
I would recommend looking at MAX_LENGTH here NLP From Scratch: Translation with a Sequence to Sequence Network and Attention — PyTorch Tutorials 1.7.1 documentation 10