avalanche.benchmarks.scenarios.OnlineCLScenario

class avalanche.benchmarks.scenarios.OnlineCLScenario(original_streams: List[EagerCLStream], experiences: Optional[Union[CLExperience, Iterable[CLExperience]]] = None, experience_size: int = 10, stream_split_strategy='fixed_size_split', access_task_boundaries: bool = False)[source]
__init__(original_streams: List[EagerCLStream], experiences: Optional[Union[CLExperience, Iterable[CLExperience]]] = None, experience_size: int = 10, stream_split_strategy='fixed_size_split', access_task_boundaries: bool = False)[source]

Creates an online scenario from an existing CL scenario

Parameters
  • original_streams – The streams from the original CL scenario.

  • experiences – If None, the online stream will be created from the train_stream of the original CL scenario, otherwise it will create an online stream from the given sequence of experiences.

  • experience_size – The size of each online experiences, as an int. Ignored if custom_split_strategy is used.

  • experience_split_strategy – A function that implements a custom splitting strategy. The function must accept an experience and return an experience’s iterator. Defaults to None, which means that the standard splitting strategy will be used (which creates experiences of size experience_size). A good starting to understand the mechanism is to look at the implementation of the standard splitting function fixed_size_experience_split_strategy().

: param access_task_boundaries: If True the attributes related to task

boundaries such as is_first_subexp and is_last_subexp become accessible during training.

Methods

__init__(original_streams[, experiences, ...])

Creates an online scenario from an existing CL scenario

Attributes

streams