Class PKSampler

Inheritance Relationships

Base Type

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.