GlobalPool

Global graph pooling operations. Aggregate node features into a single graph-level representation.

FunctionDescription
globalMaxPool x batch numGraphsMax of node features per graph.
globalMeanPool x batch numGraphsMean of node features per graph. batch: [N] maps nodes to graph index.
globalSumPool x batch numGraphsSum of node features per graph.

globalMaxPool

globalMaxPool x batch numGraphs

Max of node features per graph.

Parameters

  • x : Tensor
  • batch : Tensor
  • numGraphs : int64

Returns Tensor


globalMeanPool

globalMeanPool x batch numGraphs

Mean of node features per graph. batch: [N] maps nodes to graph index.

Parameters

  • x : Tensor
  • batch : Tensor
  • numGraphs : int64

Returns Tensor


globalSumPool

globalSumPool x batch numGraphs

Sum of node features per graph.

Parameters

  • x : Tensor
  • batch : Tensor
  • numGraphs : int64

Returns Tensor