728x90
반응형
torch.text를 사용할 때 생긴 에러
- Solution
기존 rnn.pack_padded_sequence()의 인자로 주던 CUDA vector(text_lengths in below code)를 cpu()형태로 변환
packed_embedded = nn.utils.rnn.pack_padded_sequence(embedded, text_lengths.cpu())
https://github.com/bentrevett/pytorch-sentiment-analysis/issues/93
Got error" 'lengths' argument should be a 1D CPU int64 tensor, but got 1D cuda:0 Long tensor " · Issue #93 · bentrevett/pytorc
got error" 'lengths' argument should be a 1D CPU int64 tensor, but got 1D cuda:0 Long tensor" when running the "2 - Upgraded Sentiment Analysis.ipynb" documents without ...
github.com
728x90
반응형