Hypergat#
HyperGat Layer.
- class topomodelx.nn.hypergraph.hypergat.HyperGAT(in_channels, hidden_channels, n_layers=2, layer_drop=0.2, **kwargs)[source]#
Neural network implementation of Template for hypergraph classification [1].
- Parameters:
- in_channelsint
Dimension of the input features.
- hidden_channelsint
Dimension of the hidden features.
- n_layersint, default = 2
Amount of message passing layers.
- layer_dropfloat, default = 0.2
Dropout rate for the hidden features.
- **kwargsoptional
Additional arguments for the inner layers.
References
[1]Ding, Wang, Li, Li and Huan Liu. EMNLP, 2020. https://aclanthology.org/2020.emnlp-main.399.pdf
- forward(x_0, incidence_1)[source]#
Forward computation through layers, then linear layer, then global max pooling.
- Parameters:
- x_0torch.Tensor, shape = (n_nodes, channels_nodes)
Node features.
- incidence_1torch.Tensor, shape = (n_nodes, n_edges)
Boundary matrix of rank 1.
- Returns:
- x_0torch.Tensor
Output node features.
- x_1torch.Tensor
Output hyperedge features.