Merge pull request #3424 from zh794390558/fix_opt

fix weight decay
pull/3433/head
Hui Zhang 1 year ago committed by GitHub
commit a174594465
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -102,8 +102,7 @@ class OptimizerFactory():
grad_clip = paddle.nn.ClipGradByGlobalNorm(
args['grad_clip']) if "grad_clip" in args else None
weight_decay = L2Decay(
args['weight_decay']) if "weight_decay" in args else None
weight_decay = args.get("weight_decay", None)
if weight_decay:
logger.info(f'<WeightDecay - {weight_decay}>')
if grad_clip:

Loading…
Cancel
Save