I think I was passing list(lengths.data) to pack_padded_sequence because it was an old version of pyTorch, but right now I’m passing lengths which works. squeeze() isn’t an issue for me, since I just want to get rid of the 1 dimension where ever it may be, but yeah it should be at position 1.