pylibcugraphops.pytorch.operators.agg_hg_basis_n2n_post(feat: Tensor, weights_comb: Optional[Tensor], graph: HeteroCSC, concat_own: bool = False, norm_by_out_degree: bool = False) Tensor#

PyTorch autograd function for node-to-node RGCN-like basis regularized aggregation, with features being transformed after (post) this aggregation.


The input node features. Shape: (n_src_nodes, dim_in).

weights_combOptional[torch.Tensor], default=None

The combination weights. If None, no weights are used and features of different edge types are aggregated into separate output dimensions. Shape: (n_edge_types, n_bases) if provided.


The graph used for the operation.

concat_ownbool, default=False

Concatenate output node embeddings in the aggregation.

norm_by_out_degreebool, default=False

If set, output embeddings are normed by the degree of the output node per edge type.


The aggregation output. Shape for concat_own=False: (n_dst_nodes, dim_out). Shape for concat_own=True: (n_dst_nodes, dim_out + dim_in), where dim_out = dim_in * n_bases if weights_comb is provided, and dim_out = dim_in * n_edge_types if not provided.