avalanche.benchmarks.classic.EndlessCLSim

avalanche.benchmarks.classic.EndlessCLSim(*, scenario: str = 'Classes', patch_size: int = 64, sequence_order: Optional[List[int]] = None, task_order: Optional[List[int]] = None, train_transform: Optional[Any] = Compose(ToTensor()), eval_transform: Optional[Any] = Compose(ToTensor()), dataset_root: Optional[Union[str, pathlib.Path]] = None, semseg=False)[source]

Creates a CL scenario for the Endless-Continual-Learning Simulator’s derived datasets, or custom datasets created from the Endless-Continual-Learning-Simulator’s `standalone application < https://zenodo.org/record/4899294>`__. Both are part of the publication of A Procedural World Generation Framework for Systematic Evaluation of Continual Learning.

If the dataset is not present in the computer, this method will automatically download and store it.

All generated scenarios make use of ‘task labels’. We regard a full dataset as one learning ‘sequence’, aligned to the terminology in the above paper, with ‘subsequences’ being the iterative learning tasks. Each subsequence is realized as one AvalancheDataset with ordering inforaced by task labels.

Parameters
  • scenario – Available, predefined, learning scenarios are: ‘Classes’: An learning scenario based on incremental availability of object class examples, ‘Illumination’: A learning scenario based on iteratively decreasing scene illumination. ‘Weather’: A learning scenario based on iteratively shifting weather conditions.

  • patch_size – The dimension of the image-patches. Int in the case of image-patch classification, because the image-patches need to be quadratic. Tuple of integers for image segmentation tasks.

  • sequence_order – List of intergers indexing the subsequences, enables reordering of the subsequences, especially subsequences can be omitted. Defaults to None, loading subsequences in their original order.

  • task_order – List of intergers, assigning task labels to each respective subsequence.

  • train_transform – The transformation to apply to the training data. Defaults to _default_transform, i.e. conversion ToTensor of torchvision.

  • eval_transform – The transformation to apply to the eval data. Defaults to _default_transform, i.e. conversion ToTensor of torchvision.

  • dataset_root – Absolute path indicating where to store the dataset. Defaults to None, which means the default location for ‘endless-cl-sim’ will be used.

  • semseg – boolean to indicate the use of targets for a semantic segmentation task. Defaults to False.

Returns

A properly initialized EndlessCLSim instance.