dem123456789:

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.