mindspore.dataset.SequentialSampler
- class mindspore.dataset.SequentialSampler(start_index=None, num_samples=None)[source]
Samples the dataset elements sequentially that is equivalent to not using a sampler.
- Parameters:
- Raises:
TypeError – If start_index is not of type int.
TypeError – If num_samples is not of type int.
RuntimeError – If start_index is a negative value.
ValueError – If num_samples is a negative value.
Examples
>>> import mindspore.dataset as ds >>> # creates a SequentialSampler >>> sampler = ds.SequentialSampler() >>> dataset = ds.ImageFolderDataset(image_folder_dataset_dir, ... num_parallel_workers=8, ... sampler=sampler)