SizableSequentialSampler¶
- class axtreme.data.sizable_sequential_sample.SizableSequentialSampler(data_source: Sized, num_samples: None | int = None)¶
Bases:
Sampler
[int
]Samples elements sequentially, always in the same order.
Follows the pattern in RandomSampler to allow for sampling a specific number of samplers. This can be smaller or larger than the amount in the dataset.
- __init__(data_source: Sized, num_samples: None | int = None) None ¶
Create the sampler.
- Parameters:
data_source (Dataset) – dataset to sample from
num_samples (int) – number of samples to draw, default=`len(dataset)`.
Methods
__init__
(data_source[, num_samples])Create the sampler.
Attributes
- data_source: Sized¶
- property num_samples: int¶