Skip to content
Discussion options

You must be logged in to vote
deg = degree(edge_index[1], num_nodes, dtype=torch.long)
perm = deg.argsort()
x = x[perm]
edge_index = perm[edge_index]

should give you the desired result.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@OliverSummers
Comment options

@rusty1s
Comment options

@OliverSummers
Comment options

@rusty1s
Comment options

@OliverSummers
Comment options

Answer selected by OliverSummers
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