easygraph.nn.convs.hypergraphs.hwnn_conv module#
- class easygraph.nn.convs.hypergraphs.hwnn_conv.HWNNConv(*args: Any, **kwargs: Any)[source]#
Bases:
Module
The HWNNConv model proposed in Heterogeneous Hypergraph Embedding for Graph Classification paper (WSDM 2021).
- Parameters:
in_channels (
int
) – \(C_{in}\) is the number of input channels.out_channels (
int
) – \(C_{out}\) is the number of output channels.ncount (
int
) – The Number of node in the hypergraph.K1 (
int
) – Polynomial calculation times.K2 (
int
) – Polynomial calculation times.approx (
bool
) – Whether to use polynomial fitting
- forward(X: torch.Tensor, hg: Hypergraph) torch.Tensor [source]#
The forward function.
- Parameters:
X (
torch.Tensor
) – Input vertex feature matrix. Size \((N, C_{in})\).hg (
eg.Hypergraph
) – The hypergraph structure that contains \(N\) vertices.