未验证 提交 67176383 编写于 作者: S Sylwester Klocek 提交者: GitHub

Update engine.py (#458)

Do not load optimizer states for fp32 if flag set to False.
上级 95575579
......@@ -1227,7 +1227,7 @@ class DeepSpeedEngine(Module):
self.optimizer.load_state_dict(
checkpoint['optimizer'],
load_optimizer_states=load_optimizer_states)
else:
elif load_optimizer_states:
self.optimizer.load_state_dict(checkpoint['optimizer'])
if load_lr_scheduler_states and self.lr_scheduler is not None:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册