Thanks! I Got into this trouble because I want to use pack_padded_sequence 1  to pack the data. It’s a High-level function so that I can’t recover the correspondence. Finally I packed data by myself and added zeros manually to keep all sequence have the same length.