From 7c56c718f3f79759905331530e5db19160d281fd Mon Sep 17 00:00:00 2001 From: Jasha <8935917+Jasha10@users.noreply.github.com> Date: Tue, 8 Dec 2020 00:03:09 -0600 Subject: [PATCH] Configure create_optimizer with args.opt_args Closes #301 --- timm/optim/optim_factory.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/timm/optim/optim_factory.py b/timm/optim/optim_factory.py index ecc61c5f..4c0aaca0 100644 --- a/timm/optim/optim_factory.py +++ b/timm/optim/optim_factory.py @@ -57,6 +57,8 @@ def create_optimizer(args, model, filter_bias_and_bn=True): opt_args['eps'] = args.opt_eps if hasattr(args, 'opt_betas') and args.opt_betas is not None: opt_args['betas'] = args.opt_betas + if hasattr(args, 'opt_args') and args.opt_args is not None: + opt_args.update(args.opt_args) opt_split = opt_lower.split('_') opt_lower = opt_split[-1]