songyouwei / ABSA-PyTorch

Aspect Based Sentiment Analysis, PyTorch Implementations. 基于方面的情感分析,使用PyTorch实现。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GPU issue

yassmine-lam opened this issue · comments

Hi,

I tried to run the aen model on GPU but I got this error

RuntimeError: 'lengths' argument should be a 1D CPU int64 tensor, but got 1D cuda:0 Long tensor

could someone help plz?

Thank u

modify it to "lengths.cpu()"

yes u are right
thank u

@yassmine-lam im facing the same issue. Where and how were you able to fix this?