@ptrblck
The second approach still cause no error but runs on CPU.
Also, I’ve seen an article that pack_padded_sequence require length_list of CPU tensor. In addition, the forward function of RNN block returns only the last result of each batch. I’ve used torch.cat() function to do this. Is this might be the reason?