RUCAIBox / RecBole-GNN

Efficient and extensible GNNs enhanced recommender library based on RecBole.
MIT License
167 stars 37 forks source link

请问General Recommendation的边是否能设置权重? #59

Open ralgond opened 1 year ago

ralgond commented 1 year ago

谢谢!

hyp1231 commented 1 year ago

您好!抱歉回复较晚。目前已实现的几个通用图卷积模块(LightGCN, BipartiteGCNConv, BiGNNConv)都提供了输入边的权重 edge_weight 的接口,如

https://github.com/RUCAIBox/RecBole-GNN/blob/77d76b9e19436220b32fe61af95ffd95f17c1db7/recbole_gnn/model/layers.py#L8-L14

您可以新建模型时调用这些类,并传入您希望设置的边权重。

ralgond commented 1 year ago

“您可以新建模型时调用这些类,并传入您希望设置的边权重。”

我想请教一下新建模型的步骤,请问有没有参考文档和代码?

hyp1231 commented 1 year ago

您好,新建模型可以参考这篇 API Doc,同时您也可以参考 https://github.com/RUCAIBox/RecBole-GNN/tree/main/recbole_gnn/model 下面对应类别模型的实现。