iMoonLab / HGNN

Hypergraph Neural Networks (AAAI 2019)
MIT License
680 stars 130 forks source link

Element-wise multiplication or matrix multiplication in calculating G #2

Closed zhaoyizhaoyi closed 5 years ago

zhaoyizhaoyi commented 5 years ago

In your implementation, we can see that G is obtained by element-wise multiplying the elements: https://github.com/Yue-Group/HGNN/blob/2d19c82084e4694ec3b2e911d8755dbd9129fd6e/utils/hypergraph_utils.py#L124 However, in equation (10) or (11), it looks like the matrix multiplication is operated. Also, from the original GCN paper implementation, the normalization part is also realized by matrix multiplication: https://github.com/tkipf/gcn/blob/master/gcn/utils.py#129 So anything wrong here?

xuChenSJTU commented 5 years ago

Yes, I have the same question too. Is there anything wrong?

xuChenSJTU commented 5 years ago

Well, I get it. The matrix in his code is the type of np.mat, not np.array. So his code is right with his paper. Hope it helps. @zhaoyizhaoyi

zhaoyizhaoyi commented 5 years ago

Yeah, I got it. The type of the objects are np.mat. Thanks @xuChenSJTU