avalanche.training.plugins.GDumbPlugin
- class avalanche.training.plugins.GDumbPlugin(mem_size: int = 200)[source]
GDumb plugin.
At each experience the model is trained from scratch using a buffer of samples collected from all the previous learning experiences. The buffer is updated at the start of each experience to add new classes or new examples of already encountered classes. In multitask scenarios, mem_size is the memory size for each task. This plugin can be combined with a Naive strategy to obtain the standard GDumb strategy. https://www.robots.ox.ac.uk/~tvg/publications/2020/gdumb.pdf
Methods
__init__
([mem_size])after_backward
(strategy, *args, **kwargs)Called after criterion.backward() by the BaseTemplate.
after_eval
(strategy, *args, **kwargs)Called after eval by the BaseTemplate.
after_eval_dataset_adaptation
(strategy, ...)Called after eval_dataset_adaptation by the BaseTemplate.
after_eval_exp
(strategy, *args, **kwargs)Called after eval_exp by the BaseTemplate.
after_eval_forward
(strategy, *args, **kwargs)Called after model.forward() by the BaseTemplate.
after_eval_iteration
(strategy, *args, **kwargs)Called after the end of an iteration by the BaseTemplate.
after_forward
(strategy, *args, **kwargs)Called after model.forward() by the BaseTemplate.
after_train_dataset_adaptation
(strategy, ...)Called after train_dataset_adapatation by the BaseTemplate.
after_training
(strategy, *args, **kwargs)Called after train by the BaseTemplate.
after_training_epoch
(strategy, *args, **kwargs)Called after train_epoch by the BaseTemplate.
after_training_exp
(strategy, *args, **kwargs)Called after train_exp by the BaseTemplate.
after_training_iteration
(strategy, *args, ...)Called after the end of a training iteration by the BaseTemplate.
after_update
(strategy, *args, **kwargs)Called after optimizer.update() by the BaseTemplate.
before_backward
(strategy, *args, **kwargs)Called before criterion.backward() by the BaseTemplate.
before_eval
(strategy, *args, **kwargs)Called before eval by the BaseTemplate.
before_eval_dataset_adaptation
(strategy, ...)Called before eval_dataset_adaptation by the BaseTemplate.
before_eval_exp
(strategy, *args, **kwargs)Called before eval_exp by the BaseTemplate.
before_eval_forward
(strategy, *args, **kwargs)Called before model.forward() by the BaseTemplate.
before_eval_iteration
(strategy, *args, **kwargs)Called before the start of a training iteration by the BaseTemplate.
before_forward
(strategy, *args, **kwargs)Called before model.forward() by the BaseTemplate.
before_train_dataset_adaptation
(strategy, ...)Reset model.
before_training
(strategy, *args, **kwargs)Called before train by the BaseTemplate.
before_training_epoch
(strategy, *args, **kwargs)Called before train_epoch by the BaseTemplate.
before_training_exp
(strategy, *args, **kwargs)Called before train_exp by the BaseTemplate.
before_training_iteration
(strategy, *args, ...)Called before the start of a training iteration by the BaseTemplate.
before_update
(strategy, *args, **kwargs)Called before optimizer.update() by the BaseTemplate.