mMagmer, How can I specify the value of torch.tensor(256*[55]) because in my case I use the text_lengths which is a fixed number per batch iteration. For example, rnn.pack_padded_sequence(32, 13,…) (batch 1), rnn.pack_padded_sequence(32, 7,…) (batch 2). As you can see each batch has a different length of tokens per sentence.