CCXN#
CCXN class.
- class topomodelx.nn.cell.ccxn.CCXN(in_channels_0, in_channels_1, in_channels_2, n_layers=2, att=False, **kwargs)[source]#
CCXN [1].
- Parameters:
- in_channels_0int
Dimension of input features on nodes.
- in_channels_1int
Dimension of input features on edges.
- in_channels_2int
Dimension of input features on faces.
- n_layersint
Number of CCXN layers.
- attbool
Whether to use attention.
- **kwargsoptional
Additional arguments CCXNLayer.
References
[1]Hajij, Istvan, Zamzmi. Cell complex neural networks. Topological data analysis and beyond workshop at NeurIPS 2020. https://arxiv.org/pdf/2010.00743.pdf
- forward(x_0, x_1, adjacency_0, incidence_2_t)[source]#
Forward computation through layers.
- Parameters:
- x_0torch.Tensor, shape = (n_nodes, in_channels_0)
Input features on the nodes (0-cells).
- x_1torch.Tensor, shape = (n_edges, in_channels_1)
Input features on the edges (1-cells).
- adjacency_0torch.Tensor, shape = (n_nodes, n_nodes)
Adjacency matrix of rank 0 (up).
- incidence_2_ttorch.Tensor, shape = (n_faces, n_edges)
Transpose of boundary matrix of rank 2.
- Returns:
- x_0torch.Tensor, shape = (n_nodes, in_channels_0)
Final hidden states of the nodes (0-cells).
- x_1torch.Tensor, shape = (n_edges, in_channels_1)
Final hidden states the edges (1-cells).
- x_2torch.Tensor, shape = (n_faces, in_channels_2)
Final hidden states of the faces (2-cells).