API Reference

InfiniteSampler(epoch_size, *, start_epoch, ...)

Draw reproducible samples from an infinite map-style dataset, i.e. a dataset that accepts integer indices of any size.

BatchGenerator(rngs)

Wrap a collection of NumPy pseudorandom number generators (PRNGs) such that samples can easily be drawn from all of them at once.

collate_rngs(x)

A collate function for PyTorch dataloaders that automatically wraps NumPy pseudorandom number generators (PRNGs) in a BatchGenerator object.