Skip to content
Discussion options

You must be logged in to vote

I think you have two options:

  • Use an undirected edge classifier and train on ground-truth for both directions:
out = self.MLP(x[edge_index[0]] * x[edge_index[1]])
  • Only train on one specific direction, e.g:
mask = edge_index[0] >= edge_index[1]
out = self.MLP(torch.cat([x[edge_index[0, mask]], x[edge_index[1, mask]]], dim=-1))
y = y[mask]

Replies: 5 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by edvin-svk
Comment options

You must be logged in to vote
1 reply
@rusty1s
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@rusty1s
Comment options

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