SumPooling¶
-
class
dgl.nn.mxnet.glob.
SumPooling
[source]¶ Bases:
mxnet.gluon.block.Block
Apply sum pooling over the nodes in the graph.
\[r^{(i)} = \sum_{k=1}^{N_i} x^{(i)}_k\]-
forward
(graph, feat)[source]¶ Compute sum pooling.
- Parameters
graph (DGLGraph) – The graph.
feat (mxnet.NDArray) – The input feature with shape \((N, *)\) where \(N\) is the number of nodes in the graph.
- Returns
The output feature with shape \((B, *)\), where \(B\) refers to the batch size.
- Return type
mxnet.NDArray
-