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 toSequentialSampler
).- Parameters:
datapipe – IterDataPipe to sample from
sampler – Sampler class to generate sample elements from input DataPipe. Default is
SequentialSampler
for IterDataPipe