Class RandomSampler
Defined in File samplers.h
Inheritance Relationships
Base Type
public mindspore::dataset::Sampler
(Class Sampler)
Class Documentation
-
class RandomSampler : public mindspore::dataset::Sampler
A class to represent a Random Sampler in the data pipeline.
Note
Samples the elements randomly.
Public Functions
-
explicit RandomSampler(bool replacement = false, int64_t num_samples = 0)
Constructor.
- Parameters
replacement – [in] If true, put the sample ID back for the next draw (default=false).
num_samples – [in] The number of samples to draw (default=0, return all samples).
-
~RandomSampler() = default
Destructor.
-
explicit RandomSampler(bool replacement = false, int64_t num_samples = 0)