Class SubsetSampler

Inheritance Relationships

Base Type

Derived Type

Class Documentation

class SubsetSampler : public mindspore::dataset::Sampler

A class to represent a Subset Sampler in the data pipeline.

Note

Samples the elements from a sequence of indices.

Subclassed by mindspore::dataset::SubsetRandomSampler

Public Functions

explicit SubsetSampler(std::vector<int64_t> indices, int64_t num_samples = 0)

Constructor.

Parameters
  • indices[in] A vector sequence of indices.

  • num_samples[in] The number of samples to draw (default=0, return all samples).

~SubsetSampler() = default

Destructor.