ContinualMNIST

class cl_gym.benchmarks.mnist.ContinualMNIST(num_tasks: int, per_task_examples: Optional[int] = None, per_task_joint_examples: Optional[int] = 0, per_task_memory_examples: Optional[int] = 0, per_task_subset_examples: Optional[int] = 0, task_input_transforms: Optional[list] = None, task_target_transforms: Optional[list] = None)[source]

Bases: cl_gym.benchmarks.base.Benchmark

Base class for (Permuted/Rotated/Split)-MNIST benchmarks.

load_datasets()[source]

Loading datasets from file.

precompute_memory_indices()[source]

For each task, (randomly) computes the indices of the subset of data points in the task’s dataset. Then, once load_memory() method is called, uses these indices to return a PyTorch Subset dataset. .. note:: This method will be called only if the benchmark is initiated with per_task_memory_examples.