nip.scenario_base.data.NestedArrayDictDataLoader#
- class nip.scenario_base.data.NestedArrayDictDataLoader(dataset: NestedArrayDictDataset, batch_size: int | None = 1, shuffle: bool = False, drop_last: bool = False, generator: Generator | None = None, initial_skip: int = 0, **kwargs)[source]#
Dataloader class for NestedArrayDict datasets.
- Parameters:
dataset (NestedArrayDictDataset) – The dataset to load.
batch_size (int, default=1) – How many samples per batch to load.
shuffle (bool, default=False) – Set to True to have the data reshuffled at every epoch.
drop_last (bool, default=False) – Set to True to drop the last incomplete batch, if the dataset size is not divisible by the batch size.
generator (torch.Generator | None, default=None) – Generator used for the random sampling.
initial_skip (int, default=0) – Number of initial samples to skip.
Methods Summary
__init__(dataset[, batch_size, shuffle, ...])Attributes
_auto_collation_index_samplermultiprocessing_contextdatasetbatch_sizenum_workerspin_memorydrop_lasttimeoutsamplerpin_memory_deviceprefetch_factorMethods