topobench package#

Subpackages#

Submodules#

topobench.run module#

Main entry point for training and testing models.

topobench.run.count_number_of_parameters(model: Module, only_trainable: bool = True) int[source]#

Count the number of trainable params.

If all params, specify only_trainable = False.

Ref:
Parameters:
modeltorch.nn.Module

The model.

only_trainablebool, optional

If True, only count trainable parameters (default: True).

Returns:
int

The number of parameters.

topobench.run.initialize_hydra() DictConfig[source]#

Initialize Hydra when main is not an option (e.g. tests).

Returns:
DictConfig

A DictConfig object containing the config tree.

topobench.run.main(cfg: DictConfig) float | None[source]#

Main entry point for training.

Parameters:
cfgDictConfig

Configuration composed by Hydra.

Returns:
float | None

Optional[float] with optimized metric value.

Module contents#

TopoBench: A library for benchmarking of topological models.

topobench.initialize_hydra() DictConfig[source]#

Initialize Hydra when main is not an option (e.g. tests).

Returns:
DictConfig

A DictConfig object containing the config tree.