未验证 提交 cbddf331 编写于 作者: Q qingqing01 提交者: GitHub

Fix bug in class_aware_sampling (#541)

上级 d3a971b6
...@@ -279,7 +279,7 @@ class Reader(object): ...@@ -279,7 +279,7 @@ class Reader(object):
self.indexes = np.random.choice( self.indexes = np.random.choice(
self._sample_num, self._sample_num,
self._sample_num, self._sample_num,
replace=False, replace=True,
p=self.img_weights) p=self.img_weights)
if self._shuffle: if self._shuffle:
......
...@@ -43,7 +43,6 @@ from ppdet.experimental import mixed_precision_context ...@@ -43,7 +43,6 @@ from ppdet.experimental import mixed_precision_context
from ppdet.core.workspace import load_config, merge_config, create from ppdet.core.workspace import load_config, merge_config, create
from ppdet.data.reader import create_reader from ppdet.data.reader import create_reader
from ppdet.utils.cli import print_total_cfg
from ppdet.utils import dist_utils from ppdet.utils import dist_utils
from ppdet.utils.eval_utils import parse_fetches, eval_run, eval_results from ppdet.utils.eval_utils import parse_fetches, eval_run, eval_results
from ppdet.utils.stats import TrainingStats from ppdet.utils.stats import TrainingStats
...@@ -85,8 +84,6 @@ def main(): ...@@ -85,8 +84,6 @@ def main():
check_gpu(cfg.use_gpu) check_gpu(cfg.use_gpu)
# check if paddlepaddle version is satisfied # check if paddlepaddle version is satisfied
check_version() check_version()
if not FLAGS.dist or trainer_id == 0:
print_total_cfg(cfg)
if cfg.use_gpu: if cfg.use_gpu:
devices_num = fluid.core.get_cuda_device_count() devices_num = fluid.core.get_cuda_device_count()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册