Dataloader

The Dataloader wraps the dataset and combines them with a sampler (see below) to combine single samples to whole batches.

ToDo: add flow chart diagramm

BaseDataLoader

class BaseDataLoader(dataset: delira.data_loading.dataset.AbstractDataset, batch_size=1, num_batches=None, seed=1, sampler=None)[source]

Bases: batchgenerators.dataloading.data_loader.SlimDataLoaderBase

Class to create a data batch out of data samples

_get_sample(index)[source]

Helper functions which returns an element of the dataset

Parameters

index (int) – index specifying which sample to return

Returns

Returned Data

Return type

dict

generate_train_batch()[source]

Generate Indices which behavior based on self.sampling gets data based on indices

Returns

data and labels

Return type

dict

Raises

StopIteration – If the maximum number of batches has been generated