Replies: 1 comment 4 replies
-
Your approach sounds correct to me as there's one conv layer in PyG that does what you mentioned: If you could share your code here, we could maybe further help with this :) |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I want to use a message-passing architecture (subclass of
MessagePassing
) on an undirected graph. I wasn't aware that for undirected graphs both edge directions need to be added to theedge_index
list. I have updated my list accordingly so that if there is an edge between 0 and 1,edge_index
will containboth(0, 1)
and(1, 0)
.However, updating my list does not change the model output for both training and inference. After some investigation, I found that the
MessagePassing
class has an argument to specify the flow for message calculations, which can either besource_to_target
ortarget_to_source
. I am now confused because that keyword argument suggests that the messages can only be computed in 1 way, which would explain why I get the same output, but which is confusing because that would mean thatMessagePassing
doesn't work for undirected graphs.Can someone please tell me what I got wrong and what do I need to do to get message calculations for both sides ?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions