SEQ CIFAR100#

Classes#

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

Bases: CIFAR100

Overrides the CIFAR100 dataset to change the getitem function.

class datasets.seq_cifar100.SequentialCIFAR100(args)[source]#

Bases: ContinualDataset

Sequential CIFAR100 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.

  • SIZE (tuple) – size of the images.

  • MEAN (tuple) – mean of the dataset.

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

  • TRANSFORM (torchvision.transforms) – transformation to apply to the data.

MEAN = (0.5071, 0.4867, 0.4408)#
NAME: str = 'seq-cifar100'#
N_CLASSES: int = 100#
N_CLASSES_PER_TASK: int = 10#
N_TASKS: int = 10#
SETTING: str = 'class-il'#
SIZE: Tuple[int] = (32, 32)#
STD = (0.2675, 0.2565, 0.2761)#
TRANSFORM = Compose(     RandomCrop(size=(32, 32), padding=4)     RandomHorizontalFlip(p=0.5)     ToTensor()     Normalize(mean=(0.5071, 0.4867, 0.4408), std=(0.2675, 0.2565, 0.2761)) )#
get_backbone()[source]#
get_batch_size()[source]#
get_class_names()[source]#
get_data_loaders()[source]#
Return type:

Tuple[DataLoader, DataLoader]

static get_denormalization_transform()[source]#
get_epochs()[source]#
get_examples_number()[source]#
Return type:

int

static get_loss()[source]#
static get_normalization_transform()[source]#
get_scheduler_name()[source]#
static get_transform()[source]#
class datasets.seq_cifar100.TCIFAR100(root, train=True, transform=None, target_transform=None, download=False)[source]#

Bases: CIFAR100

Workaround to avoid printing the already downloaded messages.