Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Tau-J committed Jul 26, 2023
1 parent a802a3d commit 78c8e07
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ def merge_args(cfg, args):
if args.amp is True:
from mmengine.optim import AmpOptimWrapper, OptimWrapper
optim_wrapper = cfg.optim_wrapper.get('type', OptimWrapper)
assert optim_wrapper in (OptimWrapper, AmpOptimWrapper), \
assert optim_wrapper in (OptimWrapper, AmpOptimWrapper,
'OptimWrapper', 'AmpOptimWrapper'), \
'`--amp` is not supported custom optimizer wrapper type ' \
f'`{optim_wrapper}.'
cfg.optim_wrapper.type = 'AmpOptimWrapper'
Expand Down

0 comments on commit 78c8e07

Please sign in to comment.