Skip to content
Discussion options

You must be logged in to vote

Yes, torch_scatter performs operations based on a group index.
For example, you can perform the the softmax operation you mentioned using torch_goemetric.utils.softmax, which uses torch_scatter internally, as follows

source, target = edge_index # 2*E
attr = edge_attr # E*F
out = softmax(attr, target) # softmax on features of edges incident on target node.
out = softmax(attr, source) # softmax on features of edges with common source.

Replies: 1 comment 1 reply

Comment options

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

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