FIRST STAGE STARPROMPT#

Arguments#

Options

--save_first_stage_keys0|1|True|False -> bool

Help: save text encoder outputs

  • Default: 1

--save_first_stage_keys_filenamestr

Help: filename for saving text encoder outputs. Default is:coop_keys_<N_TASKS-1>_<conf_jobnum>.pt

  • Default: None

--clip_backbonestr

Help: CLIP backbone architecture

  • Default: ViT-L/14

  • Choices: RN50, RN101, RN50x4, RN50x16, RN50x64, ViT-B/32, ViT-B/16, ViT-L/14, ViT-L/14@336px

Frozen hyperparameters

--virtual_bs_nint

Help: Virtual batch size iterations

  • Default: 1

--gr_mog_n_iters_first_stageint

Help: Number of EM iterations during fit for GR with MOG.

  • Default: 500

--gr_mog_n_componentsint

Help: Number of components for Generative Replay with MOG.

  • Default: 5

--enable_gr0|1|True|False -> bool

Help: Enable Generative Replay.

  • Default: 1

--batch_size_grint

Help: Batch size for Generative Replay.

  • Default: 128

--num_samples_grint

Help: Number of samples for Generative Replay.

  • Default: 256

Tunable hyperparameters

--num_monte_carlo_gr_first_stageint

Help: How many times to sample from the dataset for Generative Replay

  • Default: 2

--learning_rate_gr_first_stagefloat

Help: Learning rate for Generative Replay.

  • Default: 0.05

--lambda_ortho_first_stagefloat

Help: Orthogonality loss coefficient for coop

  • Default: 30

--num_epochs_gr_first_stageint

Help: Num. of epochs for Generative Replay.

  • Default: 10

Classes#

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

Bases: ContinualModel

COMPATIBILITY: List[str] = ['class-il', 'domain-il', 'task-il', 'general-continual']#
NAME: str = 'first_stage_starprompt'#
begin_task(dataset)[source]#
end_task(dataset)[source]#
forward(x)[source]#
get_parameters()[source]#
static get_parser(parser)[source]#
Return type:

ArgumentParser

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