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.
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.
.contiguous()
.view()
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!!