提交 2faa49a3 编写于 作者: H Hui Zhang

fix weight decay

上级 5d10d6e8
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册