benedekrozemberczki / SGCN

A PyTorch implementation of "Signed Graph Convolutional Network" (ICDM 2018).
GNU General Public License v3.0
268 stars 58 forks source link

BUGFIX: a little problem in ./src/signedsageconvolution.py #2

Closed WMF1997 closed 5 years ago

WMF1997 commented 5 years ago

Hello @benedekrozemberczki :

I found out a little bug in file ./src/signedsageconvolution.py

the code below in your file

edge_index = add_self_loops(edge_index, num_nodes=x.size(0))

should be replaced by

edge_index, _ = add_self_loops(edge_index, num_nodes=x.size(0))

i.e. just add , _ after edge_index

All the add_self_loops lines in the file ./src/signedsageconvolution.py are modified as I typed above.

(perhaps it is just a slip of the finger... sorry, i just know a slip of the tongue...)

and finally, it works.

My Environment is:

Ubuntu 16.04
Python 3.7.3
PyTorch 1.1.0
PyTorch_Geometric 1.2.1
PyTorch_Scatter 1.2.0

Yours, @wmf1997

benedekrozemberczki commented 5 years ago

Thank You!

Next time You can open a PR, very nice and detailed issue description. Thanks again!