afnio.utils.data.dataset#

Classes

Dataset()

An abstract class representing a Dataset.

class afnio.utils.data.dataset.Dataset[source]#

Bases: Generic[T_co]

An abstract class representing a Dataset.

All datasets that represent a map from keys to data samples should subclass it. All subclasses should overwrite __getitem__(), supporting fetching a data sample for a given key and __len__(), which is expected to return the size of the dataset by the default options of DataLoader. Subclasses could also optionally implement __getitems__(), for speedup batched samples loading. This method accepts list of indices of samples of batch and returns list of samples.