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 object of type Variable[torch.FloatTensor] but found type Variable[torch.cuda.FloatTensor] for argument #1 'other' #3

Open
SeekPoint opened this issue Aug 18, 2018 · 1 comment

Comments

@SeekPoint
Copy link

mldl@ub1604:/ub16_prj/pytorch-AGNN/agnn$ python train.py
Loading cora dataset...
Traceback (most recent call last):
File "train.py", line 113, in
train()
File "train.py", line 23, in train
output = model(features, adj)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 325, in call
result = self.forward(*input, **kwargs)
File "/home/mldl/ub16_prj/pytorch-AGNN/agnn/model.py", line 91, in forward
x = self.attentionlayers[i](x, adj)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 325, in call
result = self.forward(*input, **kwargs)
File "/home/mldl/ub16_prj/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 object of type Variable[torch.FloatTensor] but found type Variable[torch.cuda.FloatTensor] for argument #1 'other'
mldl@ub1604:
/ub16_prj/pytorch-AGNN/agnn$ python
Python 2.7.12 (default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import torch
torch.version
'0.3.0.post4'

@xuhaiyun43
Copy link

Hello, I met the same problem with you,have you resolved it?

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