pytorch_pfn_extras.distributed.DistributedValidationSampler#
- class pytorch_pfn_extras.distributed.DistributedValidationSampler(dataset, num_replicas=None, rank=None, shuffle=True, seed=0)#
Bases:
Sampler
Distributed sampler without duplication
This sampler splits the input dataset to each worker process in distributed setup without allowing repetition. It is for evaluation purpose such as
DistributedEvaluator
. This does not guarantee each worker to get the same number of samples, so for training do not use this sampler (use PyTorch DistributedSampler instead).Methods
__init__
(dataset[, num_replicas, rank, ...])- __init__(dataset, num_replicas=None, rank=None, shuffle=True, seed=0)#
- Parameters:
dataset (Sized) –
num_replicas (Optional[int]) –
rank (Optional[int]) –
shuffle (bool) –
seed (int) –
- Return type:
None