DataLoader¶
- class lightkit.data.DataLoader(dataset, **kwargs)[source]¶
Bases:
torch.utils.data.dataloader.DataLoader
[lightkit.data.loader.T_co
]Extension for PyTorch's builtin dataloader. This implementation allows to retrieve contiguous indices from a
TensorDataset
orders of magnitude faster. The data loader, thus, enables to implement traditional machine learning methods that exhibit a speed similar to the implementations found in Scikit-learn.Note
Retrieving contiguous indices is only possible when all of the following conditions apply:
shuffle=False
orbatch_sampler
is of typeRangeBatchSampler
sampler is None
num_workers=0
dataset
is not iterable