Module jidenn.model_builders

Module for building models. It separates the model building process into two parts: model initialization and model building with output layer, optimizer, loss, and metrics, with subsequent compilation. This provdes a two step facade between model definition, model initialization and model building with output layer, compilation.

During the compilation, the optimizer, loss, and metrics are defined. The optimizer is defined by the optimizer config, jidenn.config.Optimizer.

Expand source code
"""
Module for building models. It separates the model building process into two parts: model initialization 
and model building with output layer, optimizer, loss, and metrics, with subsequent compilation.
This provdes a two step facade between model definition, model initialization and model building with output layer, compilation.

During the compilation, the optimizer, loss, and metrics are defined. The optimizer is defined by the optimizer config, `jidenn.config.Optimizer`. 
"""

Sub-modules

jidenn.model_builders.LearningRateSchedulers

Module for custom Learning Rate Schedulers.

jidenn.model_builders.ModelBuilder

Module for building models from config and compiling them.

jidenn.model_builders.callbacks

Module containing the custom callbacks and a function that returns a list of callbacks to be used during the training process.

jidenn.model_builders.model_initialization

Module for initializing models using the configuration file. The config options are explicitly passed to the model classes __init__ method. For each …

jidenn.model_builders.multi_gpu_strategies

Module defining functions to be used as decorators for functions that build models. They are used to choose the strategy for multi-gpu training.

jidenn.model_builders.normalization_initialization

Module for initializing normalization layers and adapting them to the dataset, i.e. calculating the mean and std of the dataset.

jidenn.model_builders.optimizer_initialization

Module for initializing the optimizer from the config file. The corresponding config dataclass is defined in Optimizer.