topobench.nn.wrappers.cell package#

Submodules#

topobench.nn.wrappers.cell.can_wrapper module#

CAN wrapper module.

class topobench.nn.wrappers.cell.can_wrapper.CANWrapper(backbone, **kwargs)[source]#

Bases: AbstractWrapper

Wrapper for the CAN model.

This wrapper defines the forward pass of the model. The CAN model returns the embeddings of the cells of rank 1. The embeddings of the cells of rank 0 are computed as the sum of the embeddings of the cells of rank 1 connected to them.

forward(batch)[source]#

Forward pass for the CAN wrapper.

Parameters:
batchtorch_geometric.data.Data

Batch object containing the batched data.

Returns:
dict

Dictionary containing the updated model output.

topobench.nn.wrappers.cell.cccn_wrapper module#

Wrapper for the CCCN model.

class topobench.nn.wrappers.cell.cccn_wrapper.CCCNWrapper(backbone, **kwargs)[source]#

Bases: AbstractWrapper

Wrapper for the CCCN model.

This wrapper defines the forward pass of the model. The CCCN model returns the embeddings of the cells of rank 1. The embeddings of the cells of rank 0 are computed as the sum of the embeddings of the cells of rank 1 connected to them.

forward(batch)[source]#

Forward pass for the CCCN wrapper.

Parameters:
batchtorch_geometric.data.Data

Batch object containing the batched data.

Returns:
dict

Dictionary containing the updated model output.

topobench.nn.wrappers.cell.ccxn_wrapper module#

Wrapper for the CCXN model.

class topobench.nn.wrappers.cell.ccxn_wrapper.CCXNWrapper(backbone, **kwargs)[source]#

Bases: AbstractWrapper

Wrapper for the CCXN model.

This wrapper defines the forward pass of the model. The CCXN model returns the embeddings of the cells of rank 0, 1, and 2.

forward(batch)[source]#

Forward pass for the CCXN wrapper.

Parameters:
batchtorch_geometric.data.Data

Batch object containing the batched domain data.

Returns:
dict

Dictionary containing the updated model output.

topobench.nn.wrappers.cell.cwn_wrapper module#

Wrapper for the CWN model.

class topobench.nn.wrappers.cell.cwn_wrapper.CWNWrapper(backbone, **kwargs)[source]#

Bases: AbstractWrapper

Wrapper for the CWN model.

This wrapper defines the forward pass of the model. The CWN model returns the embeddings of the cells of rank 0, 1, and 2.

forward(batch)[source]#

Forward pass for the CWN wrapper.

Parameters:
batchtorch_geometric.data.Data

Batch object containing the batched domain data.

Returns:
dict

Dictionary containing the updated model output.

Module contents#

Wrappers for cell neural networks with automated exports.

class topobench.nn.wrappers.cell.CANWrapper(backbone, **kwargs)#

Bases: AbstractWrapper

Wrapper for the CAN model.

This wrapper defines the forward pass of the model. The CAN model returns the embeddings of the cells of rank 1. The embeddings of the cells of rank 0 are computed as the sum of the embeddings of the cells of rank 1 connected to them.

forward(batch)#

Forward pass for the CAN wrapper.

Parameters:
batchtorch_geometric.data.Data

Batch object containing the batched data.

Returns:
dict

Dictionary containing the updated model output.

class topobench.nn.wrappers.cell.CCCNWrapper(backbone, **kwargs)#

Bases: AbstractWrapper

Wrapper for the CCCN model.

This wrapper defines the forward pass of the model. The CCCN model returns the embeddings of the cells of rank 1. The embeddings of the cells of rank 0 are computed as the sum of the embeddings of the cells of rank 1 connected to them.

forward(batch)#

Forward pass for the CCCN wrapper.

Parameters:
batchtorch_geometric.data.Data

Batch object containing the batched data.

Returns:
dict

Dictionary containing the updated model output.

class topobench.nn.wrappers.cell.CCXNWrapper(backbone, **kwargs)#

Bases: AbstractWrapper

Wrapper for the CCXN model.

This wrapper defines the forward pass of the model. The CCXN model returns the embeddings of the cells of rank 0, 1, and 2.

forward(batch)#

Forward pass for the CCXN wrapper.

Parameters:
batchtorch_geometric.data.Data

Batch object containing the batched domain data.

Returns:
dict

Dictionary containing the updated model output.

class topobench.nn.wrappers.cell.CWNWrapper(backbone, **kwargs)#

Bases: AbstractWrapper

Wrapper for the CWN model.

This wrapper defines the forward pass of the model. The CWN model returns the embeddings of the cells of rank 0, 1, and 2.

forward(batch)#

Forward pass for the CWN wrapper.

Parameters:
batchtorch_geometric.data.Data

Batch object containing the batched domain data.

Returns:
dict

Dictionary containing the updated model output.