well, the batch_sizes here  is not actually the batch_size of batch_in
packed_seq = nn.utils.rnn.pack_padded_sequence(batch_in.transpose(0,1), batch_in_lengths,batch_first=False)

you’ll get familiar batch size.