-
Hello, I wonder if you can point out to a sample of code implementing and using graphSAGE for directed graphs. I am unsure on how to extend the current GraphSAGE layer to support in- and out-neighbors. Thanks for the help. |
Beta Was this translation helpful? Give feedback.
Answered by
rusty1s
Feb 23, 2022
Replies: 1 comment 1 reply
-
One way to utilize any GNN operator for directed graphs is to utilize two GNN layers for each edge direction. This way, each direction will not share any weights with the reverse one: x = conv1(x, edge_index).relu() + conv2(x, edge_index.flip([0])).relu() Let me know if that helps you! |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
pmoriano
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
One way to utilize any GNN operator for directed graphs is to utilize two GNN layers for each edge direction. This way, each direction will not share any weights with the reverse one:
Let me know if that helps you!