-
I will illustrate my question by the following examples. Supposing the adjacent matrix is
so, the
If I use
According the code GCNConv
The result is
and updated features are
But, if I caculate the updated features through matrix multiplication
Only if the adjacent matrix is transposed, the updated features are the same. Why is this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Yes, this is intended. The default message passing flow is from source nodes to target nodes (i.e. from |
Beta Was this translation helpful? Give feedback.
-
Thank you very much! |
Beta Was this translation helpful? Give feedback.
Yes, this is intended. The default message passing flow is from source nodes to target nodes (i.e. from
edge_index[0]
toedge_index[1]
). You can change it by settingflow="target_to_source"
. For dense GCN, this corresponds toadj.t() @ x
. Since GCN is only properly defined for undirected graphs, this usually does not matter though.