_pack_padded_sequence() code line I faced RuntimeError: 'lengths' argument should be a 1D CPU int64 tensor, but got 1D cuda:0 Long tensor. how to resolve this error?
This error is due to the input is now on GPU but expected to be on CPU. To solve it, you can simply "a.cpu()" where a is the input tensor of your function.
_pack_padded_sequence() code line I faced RuntimeError: 'lengths' argument should be a 1D CPU int64 tensor, but got 1D cuda:0 Long tensor. how to resolve this error?