add comment for pk sampler
@@ -81,6 +81,7 @@ class PKSampler(DistributedBatchSampler):
def __iter__(self):
label_per_batch = self.batch_size // self.sample_per_label
if self.shuffle:
+ # It's not accurate literally, but it helps in some dataset.
np.random.RandomState(self.epoch).shuffle(self.label_list)
for i in range(len(self)):
batch_index = []
