pytorch-AGNN icon indicating copy to clipboard operation
pytorch-AGNN copied to clipboard

RuntimeError: Expected object of type Variable[torch.FloatTensor] but found type Variable[torch.cuda.FloatTensor] for argument #1 'other'

Open SeekPoint opened this issue 7 years ago • 1 comments

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'

SeekPoint avatar Aug 18 '18 03:08 SeekPoint

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

xuhaiyun43 avatar Mar 14 '19 09:03 xuhaiyun43