Skip to content
Discussion options

You must be logged in to vote

There exists multiple options to do this:

  • You can use hooks, see here.
  • You can first compute the message via MessagePassing.edge_updater, and input the computed value into MessagePassing.propagate (basically disentangling node and value computations)
  • You can store intermediate results as a attribute
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 = ...

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@CagkanYapar
Comment options

@rusty1s
Comment options

Answer selected by CagkanYapar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants