avalanche.benchmarks.datasets.TinyImagenet

class avalanche.benchmarks.datasets.TinyImagenet(root: typing.Optional[typing.Union[str, pathlib.Path]] = None, *, train: bool = True, transform=None, target_transform=None, loader=<function default_loader>, download=True)[source]

Tiny Imagenet Pytorch Dataset

__init__(root: typing.Optional[typing.Union[str, pathlib.Path]] = None, *, train: bool = True, transform=None, target_transform=None, loader=<function default_loader>, download=True)[source]

Creates an instance of the Tiny Imagenet dataset.

Parameters
  • root – folder in which to download dataset. Defaults to None, which means that the default location for ‘tinyimagenet’ will be used.

  • train – True for training set, False for test set.

  • transform – Pytorch transformation function for x.

  • target_transform – Pytorch transformation function for y.

  • loader – the procedure to load the instance from the storage.

  • download (bool) – If True, the dataset will be downloaded if needed.

Methods

__init__([root, train, transform, ...])

Creates an instance of the Tiny Imagenet dataset.

get_test_images_paths(class_name)

Gets the test set image paths

get_train_images_paths(class_name)

Gets the training set image paths.

labels2dict(data_folder)

Returns dictionaries to convert class names into progressive ids and viceversa.

load_data()

Load all images paths and targets.

Attributes

filename

md5