snorkel.classification.DictDataLoader¶
-
class
snorkel.classification.
DictDataLoader
(dataset, collate_fn=<function collate_dicts>, **kwargs)[source]¶ Bases:
torch.utils.data.dataloader.DataLoader
A DataLoader that uses the appropriate collate_fn for a
DictDataset
.- Parameters
dataset (
DictDataset
) – A dataset to wrapcollate_fn (
Callable
[…,Any
]) – The collate function to use when combining multiple indexed examples for a single batch. Usually the default collate_dicts() method should be used, but it can be overriden if you want to use different collate logic.kwargs (
Any
) – Keyword arguments to pass on to DataLoader.__init__()
-
__init__
(dataset, collate_fn=<function collate_dicts>, **kwargs)[source]¶ Initialize self. See help(type(self)) for accurate signature.
- Return type
None
Methods
__init__
(dataset[, collate_fn])Initialize self.
check_worker_number_rationality
()Attributes
multiprocessing_context