TinySplitMNIST#
- class capymoa.datasets.ocl.TinySplitMNIST[source]#
Bases:
_BuiltInCIScenario
A lower resolution and smaller version of the SplitMNIST dataset for testing.
You should use
SplitMNIST
instead, this dataset is intended for testing and documentation purposes.16x16 resolution
100 training samples per class
20 testing samples per class
10 classes
5 tasks
- num_classes: int = 10#
The number of classes in the dataset.
- default_task_count: int = 5#
The default number of tasks in the dataset.
- mean: Sequence[float] = [0.1307]#
The mean of the features in the dataset used for normalization.
- std: Sequence[float] = [0.3081]#
The standard deviation of the features in the dataset used for normalization.
- url = 'https://www.dropbox.com/scl/fi/7ipn2j3r7okbtwyx7npi0/capymoa_tiny_mnist.npz?rlkey=4ujpsgu18s217hmqrka6acc9x&st=r3lehylt&dl=1'#
- __init__(
- num_tasks: int | None = None,
- shuffle_tasks: bool = True,
- seed: int = 0,
- directory: Path = PosixPath('data'),
- auto_download: bool = True,
- train_transform: Callable[[Any], Tensor] | None = None,
- test_transform: Callable[[Any], Tensor] | None = None,
- normalize_features: bool = False,
Create a new online continual learning datamodule.
- Parameters:
num_tasks – The number of tasks to partition the dataset into, defaults to
default_task_count
.shuffle_tasks – Should the contents and order of the tasks be shuffled, defaults to True.
seed – Seed for shuffling the tasks, defaults to 0.
directory – The directory to download the dataset to, defaults to
capymoa.datasets.get_download_dir()
.auto_download – Should the dataset be automatically downloaded if it does not exist, defaults to True.
train_transform – A transform to apply to the training dataset, defaults to
default_train_transform
.test_transform – A transform to apply to the test dataset, defaults to
default_test_transform
.normalize_features – Should the features be normalized. This normalization step is after all other transformations.
- default_test_transform: Callable[[Any], Tensor] = ToTensor()[source]#
The default transform to apply to the dataset.
- default_train_transform: Callable[[Any], Tensor] = ToTensor()[source]#
The default transform to apply to the dataset.
- train_streams: Sequence[Stream[LabeledInstance]]#
A sequence of streams containing each task for training.
- test_streams: Sequence[Stream[LabeledInstance]]#
A sequence of streams containing each task for testing.
- task_schedule: Sequence[Set[int]]#
A sequence of sets containing the classes for each task.
In online continual learning your learner may not have access to this attribute. It is provided for evaluation and debugging.