From a6ab91d5896a48a7ee7669aef9d13646e6d7b8ac Mon Sep 17 00:00:00 2001 From: qingqing01 Date: Wed, 22 Apr 2020 23:33:44 +0800 Subject: [PATCH] Fix class aware sampling (#542) --- ppdet/data/reader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppdet/data/reader.py b/ppdet/data/reader.py index b8608fbaf..335fed317 100644 --- a/ppdet/data/reader.py +++ b/ppdet/data/reader.py @@ -279,7 +279,7 @@ class Reader(object): self.indexes = np.random.choice( self._sample_num, self._sample_num, - replace=False, + replace=True, p=self.img_weights) if self._shuffle: -- GitLab