Configure create_optimizer with args.opt_args

Closes #301
pull/302/head
Jasha 4 years ago
parent 51d74d91da
commit 7c56c718f3

@ -57,6 +57,8 @@ def create_optimizer(args, model, filter_bias_and_bn=True):
opt_args['eps'] = args.opt_eps opt_args['eps'] = args.opt_eps
if hasattr(args, 'opt_betas') and args.opt_betas is not None: if hasattr(args, 'opt_betas') and args.opt_betas is not None:
opt_args['betas'] = args.opt_betas 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_split = opt_lower.split('_')
opt_lower = opt_split[-1] opt_lower = opt_split[-1]

Loading…
Cancel
Save