ER ACE AER ABS#

Arguments#

Options

--sample_selection_strategystr

Help: Sample selection strategy to use: reservoir, lars (known as LASS in the paper), or abs

  • Default: abs

  • Choices: reservoir, lars, abs

--use_aerint

Help: Use Alternate Replay?

  • Default: 1

  • Choices: 0, 1

--alpha_sample_insertionfloat

Help: percentage of high loss samples to remove from buffer

  • 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

Buffer fitting

--buffer_fitting_epochsint

Help: Number of epochs to fit on buffer

  • Default: 0

--enable_cutmix_buffer_fittingint

Help: Enable cutmix augmentation during buffer fitting?

  • Default: 0

  • Choices: 0, 1

--buffer_fitting_lrfloat

Help: Buffer fitting learning rate

  • Default: 0.05

--buffer_fitting_typestr

Help: Buffer fitting strategy: - simple: simple buffer fitting based on CE - mixmatch: try separate clean/noisy and fit with mixmatch

  • Default: mixmatch

  • Choices: simple, mixmatch

--mixmatch_naug_buffer_fittingint

Help: Number of augmentations for mixmatch during buffer fitting

  • Default: 3

--mixmatch_alpha_buffer_fittingfloat

Help: Alpha parameter for mixmatch for the Beta distribution

  • Default: 0.5

--mixmatch_lambda_buffer_fittingfloat

Help: Lambda parameter for mixmatch

  • Default: 0.01

--buffer_fitting_batch_sizeint

Help: None

  • Default: 32

Classes#

class models.er_ace_aer_abs.CustomDataset(data, targets, transform=None, extra=None, device='cpu')[source]#

Bases: Dataset

set_probs(probs)[source]#

Set the probability of each data point being correct (i.e., belonging to the Gaussian with the lowest mean)

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

Bases: ContinualModel

Er-ACE with AER and ABS, from May the Forgetting Be with You: Alternate Replay for Learning with Noisy Labels.

COMPATIBILITY: List[str] = ['class-il', 'task-il']#
NAME: str = 'er_ace_aer_abs'#
begin_epoch(epoch, dataset)[source]#
begin_task(dataset)[source]#
end_epoch(epoch, dataset)[source]#
end_task(dataset)[source]#
fit_buffer_ce()[source]#
fit_buffer_mixmatch()[source]#
static get_parser(parser)[source]#
Return type:

ArgumentParser

is_aer_fitting_epoch(epoch)[source]#
mixmatch_epoch(net, opt, loader)[source]#
observe(inputs, labels, not_aug_inputs, epoch, true_labels)[source]#
pseudo_label(net, not_aug_inputs, orig_labels, corr_probs, T=0.5)[source]#

Pseudo-label generation for MixMatch: 1. Augment the unlabeled data 2. Get the output of the model 3. Compute the average of the output 4. Sharpen the output

Additional step: - Compute the pseudo label as the weighted sum of the original label and the sharpened output, with the weight being the probability of the original label being correct

reload_model_checkpoint()[source]#
save_model_checkpoint()[source]#
split_data(test_loader, model)[source]#