Skip to content

Commit 198f6ea

Browse files
authored
Merge pull request #302 from Jasha10/create_optimizer-opt_args
Configure create_optimizer with args.opt_args
2 parents 51d74d9 + 7c56c71 commit 198f6ea

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

timm/optim/optim_factory.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ def create_optimizer(args, model, filter_bias_and_bn=True):
5757
opt_args['eps'] = args.opt_eps
5858
if hasattr(args, 'opt_betas') and args.opt_betas is not None:
5959
opt_args['betas'] = args.opt_betas
60+
if hasattr(args, 'opt_args') and args.opt_args is not None:
61+
opt_args.update(args.opt_args)
6062

6163
opt_split = opt_lower.split('_')
6264
opt_lower = opt_split[-1]

0 commit comments

Comments
 (0)