未验证 提交 14e72204 编写于 作者: F furnace 提交者: GitHub

[NPU] fix fp16 (#5417)

上级 e5e4a620
......@@ -373,7 +373,7 @@ class Trainer(object):
# enabel auto mixed precision mode
if self.cfg.get('amp', False):
scaler = amp.GradScaler(
enable=self.cfg.use_gpu, init_loss_scaling=1024)
enable=self.cfg.use_gpu or self.cfg.use_npu, init_loss_scaling=1024)
self.status.update({
'epoch_id': self.start_epoch,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册