tabensemb.model.AbstractModel.detach_model#

method

AbstractModel.detach_model(model_name: str, program: str | None = None) AbstractModel[source]#

Detach the chosen model to a separate model base with the same linked Trainer. If any model inside the model base is required, required models are detached as well. if any external model is required, the model should be detached through Trainer.detach_model.

Parameters:
model_name:

The name of the model to be detached.

program:

The new name of the detached model base. If the name is the same as the original one, the detached model is stored in memory to avoid overwriting the original model.

Returns:
AbstractModel

An AbstractModel containing the chosen model.