-
When a batch of graphs is formed, we have additional information: Global Pooling Layers commonly uses with But where to use Can someone show any examples? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
We recently also added support in from torch_scatter import segment_csr
out = segment_csr(x, data.ptr, reduce='mean') which is equivalent to doing: out = global_mean_pool(x, data.batch) The main advantage is that |
Beta Was this translation helpful? Give feedback.
-
@rusty1s Does |
Beta Was this translation helpful? Give feedback.
We recently also added support in
torch_scatter
forsegment
reductions, i.e., reductions in which the indices are ordered and grouped together. As such, one alternative to implement global pooling layers can be achieved via:which is equivalent to doing:
The main advantage is that
segment_csr
is deterministic, i.e., no atomic operations are used.