- class SortAggregation(k: int)
The pooling operator from the “An End-to-End Deep Learning Architecture for Graph Classification” paper, where node features are sorted in descending order based on their last feature channel. The first \(k\) nodes form the output of the layer.
k (int) – The number of nodes to hold for each graph.
- forward(x: Tensor, index: Optional[Tensor] = None, ptr: Optional[Tensor] = None, dim_size: Optional[int] = None, dim: int = -2) Tensor
x (torch.Tensor) – The source tensor.
dim (int, optional) – The dimension in which to aggregate. (default: