MessagePassing
Shared message-passing utilities used by all graph convolution layers.
| Function | Description |
|---|---|
aggregate aggr msg targetIdx numNodes features | Scatter messages [E, F] to target nodes [N, F] using the given aggregation. |
edgeSoftmax scores targetIdx numNodes | Edge-wise softmax: softmax of scores grouped by target node index. |
| scores: [E] or [E, H], targetIdx: [E], numNodes: N. | |
| Returns normalized attention coefficients with the same shape as scores. |
aggregate
aggregate aggr msg targetIdx numNodes features
Scatter messages [E, F] to target nodes [N, F] using the given aggregation.
Parameters
aggr:Aggregationmsg:TensortargetIdx:TensornumNodes:int64features:int64
Returns Tensor
edgeSoftmax
edgeSoftmax scores targetIdx numNodes
Edge-wise softmax: softmax of scores grouped by target node index. scores: [E] or [E, H], targetIdx: [E], numNodes: N. Returns normalized attention coefficients with the same shape as scores.
Parameters
scores:TensortargetIdx:TensornumNodes:int64
Returns Tensor