PERM MNIST#

Classes#

class datasets.perm_mnist.MyMNIST(root, train=True, transform=None, target_transform=None, download=False)[source]#

Bases: MNIST

Overrides the MNIST dataset to change the getitem function.

class datasets.perm_mnist.PermutedMNIST(args)[source]#

Bases: ContinualDataset

Permuted MNIST Dataset.

Creates a dataset composed by a sequence of tasks, each containing a different permutation of the pixels of the MNIST dataset.

Parameters:
  • NAME (str) – name of the dataset

  • SETTING (str) – setting of the experiment

  • N_CLASSES_PER_TASK (int) – number of classes in each task

  • N_TASKS (int) – number of tasks

  • SIZE (tuple) – size of the images

NAME: str = 'perm-mnist'#
N_CLASSES_PER_TASK: int = 10#
N_TASKS: int = 20#
SETTING: str = 'domain-il'#
SIZE: Tuple[int] = (28, 28)#
get_backbone()[source]#
get_batch_size()[source]#
Return type:

int

get_class_names()[source]#
get_data_loaders()[source]#
Return type:

Tuple[DataLoader, DataLoader]

static get_denormalization_transform()[source]#
get_epochs()[source]#
static get_loss()[source]#
static get_normalization_transform()[source]#
static get_transform()[source]#