diff --git a/ppdet/data/reader.py b/ppdet/data/reader.py index b8608fbaf5638ad19851a29bfeb12693c39308fa..335fed317154bc886da31571547c2c536fbf0e48 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: diff --git a/tools/train.py b/tools/train.py index 83198fcea3b057f12b21468bf882fa8f54d0a922..bdc16fb86ef43237bb87ca0f4cc6d2eefa559e9c 100644 --- a/tools/train.py +++ b/tools/train.py @@ -43,7 +43,6 @@ from ppdet.experimental import mixed_precision_context from ppdet.core.workspace import load_config, merge_config, create from ppdet.data.reader import create_reader -from ppdet.utils.cli import print_total_cfg from ppdet.utils import dist_utils from ppdet.utils.eval_utils import parse_fetches, eval_run, eval_results from ppdet.utils.stats import TrainingStats @@ -85,8 +84,6 @@ def main(): check_gpu(cfg.use_gpu) # check if paddlepaddle version is satisfied check_version() - if not FLAGS.dist or trainer_id == 0: - print_total_cfg(cfg) if cfg.use_gpu: devices_num = fluid.core.get_cuda_device_count()