Giter VIP home page Giter VIP logo

Comments (4)

guyuisland avatar guyuisland commented on May 28, 2024

我这边尝试跑了一遍,没有出现您所说的这个问题,能否提供更多的报错信息好让我们处理这个问题?

from openhgnn.

Tingting-Liu-star avatar Tingting-Liu-star commented on May 28, 2024

(openhgnn) aaa@ubuntu:~/all_data/OpenHGNN$ python main.py -m KGCN -d LastFM4KGCN -t recommendation -g 0 --use_best_config
Using backend: pytorch
Use the best config.
Model:KGCN
Task:recommendation
Dataset:LastFM4KGCN
Done saving data into cached files.
Done saving data into cached files.
Traceback (most recent call last):
File "main.py", line 26, in
OpenHGNN(args=config)
File "/home/aaa/all_data/OpenHGNN/openhgnn/start.py", line 20, in OpenHGNN
result = flow.train()
File "/home/aaa/all_data/OpenHGNN/openhgnn/trainerflow/kgcn_trainer.py", line 67, in train
self._mini_train_step()
File "/home/aaa/all_data/OpenHGNN/openhgnn/trainerflow/kgcn_trainer.py", line 86, in _mini_train_step
self.labels, self.scores = self.model(block, inputData)
File "/home/aaa/anaconda3/envs/openhgnn/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/aaa/all_data/OpenHGNN/openhgnn/models/KGCN.py", line 122, in forward
self.item_embeddings, self.userList,self.labelList = self.Aggregate(blocks, inputdata)
File "/home/aaa/anaconda3/envs/openhgnn/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/aaa/all_data/OpenHGNN/openhgnn/models/KGCN.py", line 193, in forward
self.aggregate()
File "/home/aaa/all_data/OpenHGNN/openhgnn/models/KGCN.py", line 159, in aggregate
self.item_embeddings = th.tanh(self.agg(output))
File "/home/aaa/anaconda3/envs/openhgnn/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/aaa/anaconda3/envs/openhgnn/lib/python3.7/site-packages/torch/nn/modules/linear.py", line 93, in forward
return F.linear(input, self.weight, self.bias)
File "/home/aaa/anaconda3/envs/openhgnn/lib/python3.7/site-packages/torch/nn/functional.py", line 1690, in linear
ret = torch.addmm(bias, input, weight.t())
RuntimeError: Tensor for argument #2 'mat1' is on CPU, but expected it to be on GPU (while checking arguments for addmm)

from openhgnn.

Theheavens avatar Theheavens commented on May 28, 2024

我也尝试运行了一遍,并没有复现出这个bug,请问您是否按照我们提供的安装步骤完成或者有修改过代码吗

from openhgnn.

Tingting-Liu-star avatar Tingting-Liu-star commented on May 28, 2024

感谢,我重新配置了环境,问题已解决

from openhgnn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.