orobix / Prototypical-Networks-for-Few-shot-Learning-PyTorch

Implementation of Prototypical Networks for Few Shot Learning (https://arxiv.org/abs/1703.05175) in Pytorch
MIT License
986 stars 210 forks source link

Sampling without replacement #31

Open astrocyted opened 2 years ago

astrocyted commented 2 years ago

In the original paper in "Algorithm 1", they mention that each batch is sampled "without replacement":

... RANDOMSAMPLE(S, N) denotes a set of N elements chosen uniformly at random from set S, without replacement.

where as your sampler class clearly samples with replacement as you even pass the number of iterations as an argument to the class constructor. may i ask why?