Template Class DistributedSampler
Defined in File distributed.h
Page Contents
Inheritance Relationships
Base Type
public torch::data::samplers::Sampler< std::vector< size_t > >
(Template Class Sampler)
Derived Types
public torch::data::samplers::DistributedRandomSampler
(Class DistributedRandomSampler)public torch::data::samplers::DistributedSequentialSampler
(Class DistributedSequentialSampler)
Class Documentation
-
template<typename BatchRequest = std::vector<size_t>>
class DistributedSampler : public torch::data::samplers::Sampler<std::vector<size_t>> A
Sampler
that selects a subset of indices to sample from and defines a sampling behavior.In a distributed setting, this selects a subset of the indices depending on the provided num_replicas and rank parameters. The
Sampler
performs a rounding operation based on theallow_duplicates
parameter to decide the local sample count.Subclassed by torch::data::samplers::DistributedRandomSampler, torch::data::samplers::DistributedSequentialSampler