avalanche.benchmarks.scenarios.OnlineCLExperience

class avalanche.benchmarks.scenarios.OnlineCLExperience(*, dataset: TCLDataset, origin_experience: DatasetExperience, is_first_subexp: bool = False, is_last_subexp: bool = False, sub_stream_length: int | None = None, access_task_boundaries: bool = False)[source]

Online CL (OCL) Experience.

OCL experiences are created by splitting a larger experience. Therefore, they keep track of the original experience for logging purposes.

__init__(*, dataset: TCLDataset, origin_experience: DatasetExperience, is_first_subexp: bool = False, is_last_subexp: bool = False, sub_stream_length: int | None = None, access_task_boundaries: bool = False)[source]

A class representing a continual learning experience in an online setting.

Parameters:
  • current_experience (int) – The index of the current experience.

  • dataset (TCLDataset) – The dataset containing the experience.

  • origin_experience (DatasetExperience) – The original experience from which this experience was derived.

  • is_first_subexp (bool, optional) – Whether this is the first sub-experience.

  • is_last_subexp (bool, optional) – Whether this is the last sub-experience.

  • sub_stream_length (int, optional) – The length of the sub-stream.

  • access_task_boundaries (bool, optional) – Whether to access task boundaries.

Methods

__init__(*, dataset, origin_experience[, ...])

A class representing a continual learning experience in an online setting.

eval()

Return inference experience.

logging()

Return logging experience.

no_attribute_masking()

train()

Return training experience.

Attributes

are_attributes_masked

current_experience

dataset

origin_stream