Extracting the individual messages for a message passing network #5128
Answered
by
rusty1s
CagkanYapar
asked this question in
Q&A
-
Hi, I have a question regarding message passing networks. I am interested in getting the individual messages, i.e. the edge values and not only the node values. |
Beta Was this translation helpful? Give feedback.
Answered by
rusty1s
Aug 4, 2022
Replies: 1 comment 2 replies
-
There exists multiple options to do this:
def forward(self, ...):
self.propagate(edge_index, ...)
edge_attr = self.my_edge_attr
self.my_edge_attr = None
def message(self, ...):
self.my_edge_attr = ... |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
CagkanYapar
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There exists multiple options to do this:
MessagePassing.edge_updater
, and input the computed value intoMessagePassing.propagate
(basically disentangling node and value computations)