torch.nn.Module, even pretrained models. The
modelssub-module provides for you the most commonly used architectures in the CL literature.
DynamicModules to support these use cases.
torch.nn.Modules that provide an addition method,
adaptation, that is used to update the model's architecture. The method takes a single argument, the data from the current experience.
adaptationmethod, the model adds 2 new units to account for the new classes. Notice that no learning occurs at this point since the method only modifies the model's architecture.
MultiTaskModules. These are dynamic models (since they need to be updated whenever they encounter a new task) that have an additional
task_labelsargument in their
task_labelsis a tensor with a task id for each sample.
MultiHeadClassifier, a new head is initialized whenever a new task is encountered. Avalanche strategies automatically recognizes multi-task modules and provide the task labels to them.
adaptation(if needed), and
forwardmethod of the base class will split the mini-batch by task-id and provide single task mini-batches to
as_multitaskwrapper, which converts the model for you.