seq_cub200#

Classes

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

Bases: MyCUB200

Base CUB200 dataset.

class datasets.seq_cub200.MyCUB200(root, train=True, transform=None, target_transform=None, download=True)[source]#

Bases: Dataset

Overrides dataset to change the getitem function.

IMG_SIZE = 224#
MEAN = (0.4856, 0.4994, 0.4324)#
N_CLASSES = 200#
STD = (0.2272, 0.2226, 0.2613)#
TEST_TRANSFORM = Compose(     Resize(size=224, interpolation=bilinear, max_size=None, antialias=warn)     ToTensor()     Normalize(mean=(0.4856, 0.4994, 0.4324), std=(0.2272, 0.2226, 0.2613)) )#
class datasets.seq_cub200.SequentialCUB200(args)[source]#

Bases: ContinualDataset

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

  • 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.

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

MEAN = (0.4856, 0.4994, 0.4324)#
NAME: str = 'seq-cub200'#
N_CLASSES_PER_TASK: int = 20#
N_TASKS: int = 10#
SETTING: str = 'class-il'#
SIZE: Tuple[int] = (224, 224)#
STD = (0.2272, 0.2226, 0.2613)#
TEST_TRANSFORM = Compose(     Resize(size=224, interpolation=bilinear, max_size=None, antialias=warn)     ToTensor()     Normalize(mean=(0.4856, 0.4994, 0.4324), std=(0.2272, 0.2226, 0.2613)) )#
TRANSFORM = Compose(     Resize(size=224, interpolation=bilinear, max_size=None, antialias=warn)     RandomCrop(size=(224, 224), padding=4)     RandomHorizontalFlip(p=0.5)     ToTensor()     Normalize(mean=(0.4856, 0.4994, 0.4324), std=(0.2272, 0.2226, 0.2613)) )#
static get_backbone(hookme=False)[source]#
static get_batch_size()[source]#
get_data_loaders()[source]#
Return type:

Tuple[DataLoader, DataLoader]

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