mml.core.scripts.schedulers.transfer_scheduler

class TransferScheduler[source]

Inherited from TrainingScheduler this scheduler supports the same subroutines: - model training - model prediction - model testing

But it adds the option to finetune an existing model by choosing a mode.pretrain_task in the config.

__init__(cfg: DictConfig)[source]
after_training_hook(datamodule: LightningDataModule, model: LightningModule, trainer: Trainer, fold: int, task_name: str) None[source]

If necessary unfreezes the model backbone.

before_training_hook(datamodule: LightningDataModule, model: LightningModule, trainer: Trainer, fold: int, task_name: str) None[source]

Implements the weight loading logic.