flint.utils.data¶
Dataloader¶
- class flint.utils.data.dataloader.DataLoader(dataset: flint.utils.data.dataset.Dataset, batch_size: Optional[int] = 1, collate_fn: Optional[Callable] = None)[source]¶
Bases:
object
DataLoader provides an iterable over the given dataset. It supports automatic mini-batching now.
- Parameters
dataset (Dataset) – Dataset from which to load the data.
batch_size (int, optional, default=1) – How many samples per batch to load.
collate_fn (callable, optional) – Merge a list of samples to form a mini-batch of Tensor(s).
Dataset¶
- class flint.utils.data.dataset.ConcatDataset(datasets: Iterable[flint.utils.data.dataset.Dataset])[source]¶
Bases:
flint.utils.data.dataset.Dataset
Dataset as a concatenation of multiple datasets. This class is useful to assemble different existing datasets.
- Parameters
datasets (list) – List of datasets to be concatenated
- cumulative_sizes: List[int]¶
- datasets: List[flint.utils.data.dataset.Dataset]¶