Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: expected device cpu but got device cuda:0 #5

Open
yisoso opened this issue May 16, 2021 · 2 comments
Open

RuntimeError: expected device cpu but got device cuda:0 #5

yisoso opened this issue May 16, 2021 · 2 comments

Comments

@yisoso
Copy link

yisoso commented May 16, 2021

File ".../pytorch-AGNN\agnn\model.py", line 28, in forward
torch.div(torch.mm(x, x.t()), torch.mm(norm2, norm2.t()) + 1e-7)
RuntimeError: expected device cpu but got device cuda:0

@Alves-7
Copy link

Alves-7 commented Jun 10, 2021

maybe you can change "self.beta" to "self.beta.cuda()"

@Alves-7
Copy link

Alves-7 commented Jun 10, 2021

File ".../pytorch-AGNN\agnn\model.py", line 28, in forward
torch.div(torch.mm(x, x.t()), torch.mm(norm2, norm2.t()) + 1e-7)
RuntimeError: expected device cpu but got device cuda:0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants