avalanche.training.templates.BaseTemplate
- class avalanche.training.templates.BaseTemplate(model: Module, device='cpu', plugins: Optional[List[BasePlugin]] = None)[source]
Base class for continual learning skeletons.
Training loop The training loop is organized as follows:
train train_exp # for each experience
Evaluation loop The evaluation loop is organized as follows:
eval eval_exp # for each experience
- __init__(model: Module, device='cpu', plugins: Optional[List[BasePlugin]] = None)[source]
Init.
Methods
__init__(model[, device, plugins])Init.
eval(exp_list, **kwargs)Evaluate the current model on a series of experiences and returns the last recorded value for each metric.
train(experiences[, eval_streams])Training loop.
Attributes
is_evalTrue if the strategy is in evaluation mode.
modelPyTorch model.
devicePyTorch device where the model will be allocated.
pluginsList of `SupervisedPlugin`s. .
experienceCurrent experience.
is_trainingTrue if the strategy is in training mode.
current_eval_streamCurrent evaluation stream.