CCIC#

Arguments#

Options

--alphafloat

Help: Unsupervised loss weight.

  • Default: 0.5

--knn_kint

Help: k of kNN.

  • Default: 2

--memory_penaltyfloat

Help: Unsupervised penalty weight.

  • Default: 1.0

--k_augint

Help: Number of augumentation to compute label predictions.

  • Default: 3

--mixmatch_alphafloat

Help: Regularization weight.

  • Default: 0.5

--sharp_tempfloat

Help: Temperature for sharpening.

  • Default: 0.5

--mixup_alphafloat

Help: None

  • Default: 0.75

Rehearsal arguments

Arguments shared by all rehearsal-based methods.

--buffer_sizeint

Help: The size of the memory buffer.

  • Default: None

--minibatch_sizeint

Help: The batch size of the memory buffer.

  • Default: None

Classes#

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

Bases: ContinualModel

Continual Semi-Supervised Learning via Continual Contrastive Interpolation Consistency.

COMPATIBILITY: List[str] = ['class-il', 'domain-il', 'task-il', 'cssl']#
NAME: str = 'ccic'#
compute_embeddings()[source]#

Computes a vector representing mean features for each class.

discard_supervised_labels(inputs, labels, not_aug_inputs)[source]#
discard_unsupervised_labels(inputs, labels, not_aug_inputs)[source]#
end_task(dataset)[source]#
forward(x)[source]#
get_debug_iters()[source]#

Returns the number of iterations to wait before logging. - CCIC needs a couple more iterations to initialize the KNN.

static get_parser(parser)[source]#
Return type:

ArgumentParser

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