Skip to content
Discussion options

You must be logged in to vote

If I understand you correctly, you are searching for a way to apply RGCNConv on weighted graphs? In that case, you can extend RGCNConv and add an edge_weight to its argument which is then used in message. Pseudo-code:

def forward(self, x, edge_index, edge_weight, edge_type):
    out = 0
    for i in range(num_edge_types):
        mask = edge_type == i
        out += self.propagate(edge_index[:, mask], edge_type=i, edge_weight=edge_weight[mask])
   return out
   
def message(self, x_j, edge_weight, edge_type):
    return edge_weight * x_j @ self.weight[edge_type]

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Helaly96
Comment options

@EdisonLeeeee
Comment options

@Helaly96
Comment options

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