Class PKSampler
Defined in File samplers.h
Inheritance Relationships
Base Type
public mindspore::dataset::Sampler
(Class Sampler)
Class Documentation
-
class PKSampler : public mindspore::dataset::Sampler
A class to represent a PK Sampler in the data pipeline.
Note
Samples K elements for each P class in the dataset. This will sample all classes.
Public Functions
-
explicit PKSampler(int64_t num_val, bool shuffle = false, int64_t num_samples = 0)
Constructor.
- Parameters
num_val – [in] Number of elements to sample for each class.
shuffle – [in] If true, the class IDs are shuffled (default=false).
num_samples – [in] The number of samples to draw (default=0, return all samples).
-
~PKSampler() = default
Destructor.
-
explicit PKSampler(int64_t num_val, bool shuffle = false, int64_t num_samples = 0)