CustomDataset
- class colibri.data.datasets.CustomDataset(name, path='data', transform_dict={}, **kwargs_builtin)[source]
Bases:
Dataset
Custom dataset.
This class allows to load custom datasets and apply transformations to the data.
- The datasets that can be currently loaded are:
‘cifar10’
‘mnist’
‘fashion_mnist’
‘cave’
- This class is divided in two parts:
builtin datasets: datasets that are predefined in the repository.
custom datasets: datasets that are not predefined in the repository.
The builtin datasets are loaded using the function load_builtin_dataset from the module colibri.data.utils. The custom datasets are loaded using the function get_filenames from the module colibri.data.utils. The transformations are applied to the data using the torchvision.transforms module.
- The default transformations are:
input: transforms.ToTensor()
output: transforms.ToTensor()
- Parameters:
name (string) – Name of the dataset. Current options are: (‘cifar10’, ‘cifar100’, ‘mnist’, ‘fashion_mnist’, ‘cave’).
path (string) – Path to directory with the dataset.
transform_dict (dict,object) – Dictionary with the transformations to apply to the data.
kwargs_builtin (dict,object) – Dictionary with the parameters to load the builtin datasets, each pytorch dataset has its own parameters please refer to the pytorch documentation.