LWF#

Arguments#

Options

--alphafloat

Help: Penalty weight.

  • Default: 0.5

--softmax_tempfloat

Help: Temperature of the softmax function.

  • Default: 2

Classes#

class models.lwf.Lwf(backbone, loss, args, transform, dataset=None)[source]#

Bases: ContinualModel

Continual learning via Learning without Forgetting.

COMPATIBILITY: List[str] = ['class-il', 'task-il']#
NAME: str = 'lwf'#
begin_task(dataset)[source]#
static get_parser(parser)[source]#
Return type:

ArgumentParser

observe(inputs, labels, not_aug_inputs, logits=None, epoch=None)[source]#

Functions#

models.lwf.modified_kl_div(old, new)[source]#
models.lwf.smooth(logits, temp, dim)[source]#