Skip to content

Repeated Augmentation and its effects #1206

Answered by hankyul2
vbvg2008 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @vbvg2008

Benefit of repeated augmentation is from itself. Repeated augmentation does not extend training epoch. RepeatAugSampler only select 1/aug_repeat samples from whole dataset and repeat each sample for aug_repeat times so that each gpu could train model on same samples.

In this code, the number of selected samples for each gpu is len(dataset)/num_gpu, which means that the number of samples does not change at all.

For better understanding, see below code with comments.

class RepeatAugSampler(Sampler):
    def __init__(self, ...):
        ...
        selected_ratio = dist.get_worl_size() # selected_ratio = number of gpu
        self.num_selected_samples = len(self.datasets) / sele…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@vbvg2008
Comment options

@hankyul2
Comment options

Answer selected by vbvg2008
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants