Class Sampler

Inheritance Relationships

Base Type

  • private std::enable_shared_from_this< Sampler >

Derived Types

Class Documentation

class Sampler : private std::enable_shared_from_this<Sampler>

An abstract base class to represent a sampler in the data pipeline.

Subclassed by mindspore::dataset::DistributedSampler, mindspore::dataset::PKSampler, mindspore::dataset::RandomSampler, mindspore::dataset::SequentialSampler, mindspore::dataset::SubsetSampler, mindspore::dataset::WeightedRandomSampler

Public Functions

Sampler() = default

Constructor.

virtual ~Sampler() = default

Destructor.

inline virtual void AddChild(const std::shared_ptr<Sampler> &child)

A virtual function to add a child sampler.

Parameters

child[in] The child sampler to be added as a children of this sampler.