Skip to content
Discussion options

You must be logged in to vote

How about using argsort() to re-sort your data so that nodes with the same node degree have a contiguous memory layout? For example, for re-permuting the node features, you can do:

perm = indegree.argsort()
data.x = data.x[perm]

For re-permuting edge indices, you can do:

data.edge_index = perm[data.edge_index]

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@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