Problem in pad_packed_sequence

When I use package_padded_sequence and pad_packed_sequence to handle variable length sequences.I have a problem, that is, I can’t print the result of pad_packed_sequence output when my batch_first is set to True.


However, once I set the batch_first in the pad_packed_sequence function to False, I can output the result correctly.
Thank you for your help.

Because it is a newcomer, I can only upload one image. Below is a part of the code I wrote.

The error message points to a non-contiguous tensor.
Call .contiguous() on your tensor before the .view() call.

Based on the error message, this should work:

start = [get_summarized_data(self[i]).contiguous().view(-1) for i in range(...)]

Thank you for your help!!