Skip to content
Discussion options

You must be logged in to vote

You can use segment_csr from torch-scatter:

from torch_scatter import segment_csr

global_x = segment_csr(x, batch.ptr, reduce='sum')

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@realCrush
Comment options

@realCrush
Comment options

@rusty1s
Comment options

@realCrush
Comment options

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