RUCAIBox / RecBole

A unified, comprehensive and efficient recommendation library
https://recbole.io/
MIT License
3.27k stars 590 forks source link

跑KGAT一直报dgl相关的错误,想请问是不是要下载特定版本的dgl #1978

Open catmint999 opened 5 months ago

catmint999 commented 5 months ago

我的dgl是2.0.0

  1. 报错sub_graph,修改成如下可以运行 sub_graph = ( dgl.edge_subgraph(self.ckg, edge_idxs) # , preserve_nodes=True 不能用 .adj_external(scipy_fmt='coo', transpose=False) # transpose=False, scipy_fmt="coo" #参考:https://docs.dgl.ai/generated/dgl.DGLGraph.adj.html#dgl.DGLGraph.adj .astype("float") )
  2. 报错final_adj_matrix = sum(adj_list).tocoo(),错误原因ValueError: inconsistent shapes
catmint999 commented 5 months ago

已解决,修改成sub_graph = ( dgl.edge_subgraph(self.ckg, edge_idxs, relabel_nodes=False) # , preserve_nodes=True 不能用 .adj_external(scipy_fmt='coo', transpose=False) # transpose=False, scipy_fmt="coo" #参考:https://docs.dgl.ai/generated/dgl.DGLGraph.adj.html#dgl.DGLGraph.adj .astype("float") )可运行