dataloaders
PyTorch-specific DataLoader implementations.
Classes
PyTorchIterableBitfountDataLoader
class PyTorchIterableBitfountDataLoader( dataset: _IterableBitfountDataset, secure_rng: bool = False, batch_size: int = 1, shuffle: bool = False,):Wraps a PyTorch DataLoader with bitfount functions.
Arguments
batch_size: The batch size for the dataloader. Defaults to 1.dataset: An iterable dataset.secure_rng: A boolean value indicating whether to use a secure random number generator. Defaults to False.shuffle: A boolean value indicating whether the values in the dataset should be shuffled. Defaults to False.
Attributes
batch_size: The batch size for the dataloader. Defaults to 1.secure_rng: A boolean value indicating whether to use a secure random number generator. Defaults to False.shuffle: A boolean value indicating whether the values in the dataset should be shuffled. Defaults to False.
Ancestors
Variables
-
nominal_num_batches : int- Batch count ignoring frame-shape bucketing.Epoch arithmetic only - not the number of batches iteration will actually yield for image datasets, where batches are grouped by frame shape and can be smaller than
batch_size.Returns: The number of elements when there is no batch size, otherwise
len(dataset)divided by the batch size, rounded up.
Methods
expect_key_in_iter
def expect_key_in_iter(self) ‑> bool:Will there be a data key entry in the output from iteration?