@ptrblck To give more context, I’m trying to port a model from Keras to Pytorch. Specifically, the model in Keras has a Masking layer applied.
Referring to this blog - section “How the PackedSequence object works”, what I understood is that the input_lengths refers to the length of the longest sequence in a batch where the length is defined as the last non-zero element in the sequence.
Did I understood the concept wrongly?