training#

Functions

utils.training.evaluate(model, dataset, last=False)[source]#

Evaluates the accuracy of the model for each past task.

The accuracy is evaluated for all the tasks up to the current one, only for the total number of classes seen so far.

Parameters:
Returns:

a tuple of lists, containing the class-il and task-il accuracy for each task

Return type:

Tuple[list, list]

utils.training.initialize_wandb(args)[source]#

Initializes wandb, if installed.

Parameters:

args (Namespace) – the arguments of the current execution

utils.training.mask_classes(outputs, dataset, k)[source]#

Given the output tensor, the dataset at hand and the current task, masks the former by setting the responses for the other tasks at -inf. It is used to obtain the results for the task-il setting.

Parameters:
utils.training.train(model, dataset, args)[source]#

The training process, including evaluations and loggers.

Parameters: