Shortcuts

Sampler

class torchdata.datapipes.iter.Sampler(datapipe: IterDataPipe, sampler: Type[Sampler] = SequentialSampler, sampler_args: Optional[Tuple] = None, sampler_kwargs: Optional[Dict] = None)

Generates sample elements using the provided Sampler (defaults to SequentialSampler).

Parameters:
  • datapipe – IterDataPipe to sample from

  • sampler – Sampler class to generate sample elements from input DataPipe. Default is SequentialSampler for IterDataPipe

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources