mirror of
https://github.com/PaddlePaddle/PaddleClas.git
synced 2025-06-03 21:55:06 +08:00
fix pksampler prob list shuffle bug
This commit is contained in:
parent
5ae888cf0d
commit
7cdae10bcf
@ -104,6 +104,8 @@ class PKSampler(DistributedBatchSampler):
|
|||||||
rank = dist.get_rank()
|
rank = dist.get_rank()
|
||||||
np.random.RandomState(rank * self.total_epochs +
|
np.random.RandomState(rank * self.total_epochs +
|
||||||
self.epoch).shuffle(self.label_list)
|
self.epoch).shuffle(self.label_list)
|
||||||
|
np.random.RandomState(rank * self.total_epochs +
|
||||||
|
self.epoch).shuffle(self.prob_list)
|
||||||
self.epoch += 1
|
self.epoch += 1
|
||||||
|
|
||||||
label_per_batch = self.batch_size // self.sample_per_id
|
label_per_batch = self.batch_size // self.sample_per_id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user