mmg63 / Hypergraph-Convolution-and-Attention-networks

Hypergraph convolution and attention networks research
MIT License
12 stars 1 forks source link

代码报错assert hyperedge_attr is not None AssertionError #1

Open shuqincao opened 2 years ago

shuqincao commented 2 years ago

pure_hypergraph.py里面的“x = F.elu(self.hconv1(x, data.edge_index))”报错 : File "F:/orginalCode/Hypergraph-Convolution-and-Attention-networks-main/pure_hypergraph.py", line 159, in forward x = F.elu(self.hconv1(x, data.edge_index)) File "D:\programfiles\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "D:\programfiles\Anaconda3\lib\site-packages\torch_geometric\nn\conv\hypergraph_conv.py", line 130, in forward assert hyperedge_attr is not None AssertionError

Upcreat commented 1 year ago

作者这里少填了一个参数,因为调用的是pyg库,库中的代码如果使用(use_attention=True),则需要填入hyperedge_attr

Lang-cheese commented 1 year ago

作者这里少填了一个参数,因为调用的是pyg库,库中的代码如果使用(use_attention=True),则需要填入hyperedge_attr 请问hyperedge_attr具体加在哪里呢? 我的函数定义为self.conv1 = HypergraphConv(num_features_xd, num_features_xd, use_attention=True) 赋值x = self.conv1(x, edge_index) 具体该如何修改