SLCA#

Arguments#

Options

--prefixstr

Help: None

  • Default: reproduce

--memory_sizeint

Help: None

  • Default: 0

--memory_per_classint

Help: None

  • Default: 0

--fixed_memory0|1|True|False -> bool

Help: None

  • Default: 0

--feature_extractor_typestr

Help: the type of feature extractor to use. vit-b-p16 is the default: ViT-B/16 pretrained on Imagenet 21k (NO finetuning on ImageNet 1k)

  • Default: vit-b-p16

--ca_epochsint

Help: number of epochs for classifier alignment

  • Default: 5

--ca_with_logit_normfloat

Help: None

  • Default: 0.1

--milestonesstr

Help: None

  • Default: 40

--lr_decayfloat

Help: None

  • Default: 0.1

--virtual_bs_iterationsint

Help: virtual batch size iterations

  • Default: 1

Classes#

class models.slca_utils.slca.SLCA_Model(device, args)[source]#

Bases: BaseLearner

after_task()[source]#
eval()[source]#
get_optimizer()[source]#
my_compute_class_means(loader, offset_1, offset_2)[source]#
to(device)[source]#
train(*args)[source]#
property training#