Datasets#

Submodules#

Sequential CIFAR-10#

class datasets.seq_cifar10.MyCIFAR10(root, train=True, transform=None, target_transform=None)[source]#

Bases: MammothDataset, CIFAR10

Overrides the CIFAR10 dataset to change the getitem function.

class datasets.seq_cifar10.SequentialCIFAR10(args)[source]#

Bases: ContinualDataset

Sequential CIFAR10 Dataset.

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

  • SETTING (str) – setting of the dataset.

  • N_CLASSES_PER_TASK (int) – number of classes per task.

  • N_TASKS (int) – number of tasks.

  • N_CLASSES (int) – number of classes.

  • MEAN (tuple) – mean of the dataset.

  • STD (tuple) – standard deviation of the dataset.

  • TRANSFORM (torchvision.transforms) – transformations to apply to the dataset.

MEAN = (0.4914, 0.4822, 0.4465)#
NAME: str = 'seq-cifar10'#
N_CLASSES: int = 10#
N_CLASSES_PER_TASK: int = 2#
N_TASKS: int = 5#
SETTING: str = 'class-il'#
SIZE: Tuple[int, int] = (32, 32)#
STD = (0.247, 0.2435, 0.2615)#
TEST_TRANSFORM = Compose(     ToTensor()     Normalize(mean=(0.4914, 0.4822, 0.4465), std=(0.247, 0.2435, 0.2615)) )#
TRANSFORM = Compose(     RandomCrop(size=(32, 32), padding=4)     RandomHorizontalFlip(p=0.5)     ToTensor()     Normalize(mean=(0.4914, 0.4822, 0.4465), std=(0.247, 0.2435, 0.2615)) )#
static get_backbone()[source]#
get_data_loaders()[source]#

Class method that returns the train and test loaders.

static get_normalization_transform()[source]#