提交 ab29eaa8 编写于 作者: G gaotingquan 提交者: Wei Shengyu

debug

上级 106ff270
......@@ -70,7 +70,7 @@ class CombinedLoss(nn.Layer):
logger.debug("build loss {} success.".format(loss_func))
self.scaler = None
if amp_config:
if amp_config and paddle.in_dynamic_mode():
if self.mode == "Train" or AMPForwardDecorator.amp_eval:
self.scaler = paddle.amp.GradScaler(
init_loss_scaling=amp_config.get("scale_loss", 1.0),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册