BUPT-GAMMA / OpenHGNN

This is an open-source toolkit for Heterogeneous Graph Neural Network(OpenHGNN) based on DGL.
Apache License 2.0
828 stars 141 forks source link

[RGCN] [RHGNN] Fixed code runtime error #150

Closed J0kerFeng closed 1 year ago

J0kerFeng commented 1 year ago

Description

[RGCN]: Add the ’fanout‘ attribute to configuration file to fix: "AttributeError: 'Config' object has no attribute 'fanout'" problem. The value of ’fanout‘ is set to -1 by default and will need to be changed in the future based on the model parameters. [RHGNN]: Adds the 'device' parameter to the 'dataloader' object in the 'link_prediction.py' file to fix: "RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!" problem.

Checklist

Please feel free to remove inapplicable items for your PR.

Changes

J0kerFeng commented 1 year ago

There seems to be another problem here. When running RHGNN on gpu, The following error occurs: RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument mat1 in method wrapper_addmm)

I have updated PR to fix this problem.