TRAINING#
Functions#
- utils.training.initialize_wandb(args)[source]#
Initializes wandb, if installed.
- Parameters:
args (Namespace) – the arguments of the current execution
- utils.training.train(model, dataset, args)[source]#
The training process, including evaluations and loggers.
- Parameters:
model (ContinualModel) – the module to be trained
dataset (ContinualDataset) – the continual dataset at hand
args (Namespace) – the arguments of the current execution
- utils.training.train_single_epoch(model, train_loader, args, epoch, pbar, system_tracker=None, scheduler=None)[source]#
Trains the model for a single epoch.
- Parameters:
model (ContinualModel) – the model to be trained
train_loader (Iterable) – the data loader for the training set
args (Namespace) – the arguments from the command line
epoch (int) – the current epoch
system_tracker – the system tracker to monitor the system stats
scheduler – the scheduler for the current epoch
- Returns:
the number of iterations performed in the current epoch
- Return type: