Is there an inverse of rnn.pad_sequence

I encounter a situation where I need to store intemediate representations of the sequential dataset with variable length. I cannot directly store packed sequence as the order of batch data can be random. Therefore, I am wondering how we can inverse the operation of pad_sequence?

Not sure that I understand your problem, but inverse operation is unstacking with “unbind” op. There is no built-in way to strip variable-sized padding tails after that AFAIK.