avalanche.benchmarks.class_incremental_benchmark
- avalanche.benchmarks.class_incremental_benchmark(datasets_dict: Dict[str, ClassificationDataset], *, class_order: Sequence[int] | None = None, num_experiences: int | None = None, num_classes_per_exp: Sequence[int] | None = None, seed: int | None = None) CLScenario [source]
Splits datasets according to a class-incremental scenario.
Each dataset will create a stream with the same class order.
- Parameters:
datasets_dict – A dictionary with stream names as keys (str) and AvalancheDataset as values. Usually, you want to provide at least train and test stream.
class_order – List of classes that determine the order of appearance in the stream. If None, random classes will be used. Defaults to None (random classes).
num_experiences – desired number of experiences in the stream.
num_classes_per_exp – If not None, a list with the number of classes to pick for each experience.
seed – The seed to use for random shuffling if class_order is None. If None, the current PyTorch random number generator state will be used. Defaults to None.
- Returns:
A class-incremental
CLScenario
.