Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Dai-Wenxun committed Nov 10, 2022
1 parent 938b026 commit 89ff56e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tools/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,11 @@ def merge_args(cfg, args):
cfg.auto_scale_lr.enable = True

# set random seeds
cfg.randomness = dict(
seed=args.seed,
diff_rank_seed=args.diff_rank_seed,
deterministic=args.deterministic)
if cfg.get('randomness', None) is None:
cfg.randomness = dict(
seed=args.seed,
diff_rank_seed=args.diff_rank_seed,
deterministic=args.deterministic)

if args.cfg_options is not None:
cfg.merge_from_dict(args.cfg_options)
Expand Down

0 comments on commit 89ff56e

Please sign in to comment.