未验证 提交 c3634c6b 编写于 作者: S ShenLiang 提交者: GitHub

fix amp bug of fleet (#31532)

上级 027b574a
......@@ -637,6 +637,11 @@ class Fleet(object):
self._user_defined_strategy = copy.deepcopy(strategy)
self._context = {}
# TODO(shenliang03): This is a temporary solution to support amp. In the case of a dynamic graph,
# the optimizer is returned directly. This problem will be fixed in the future.
if paddle.fluid.framework.in_dygraph_mode():
return optimizer
return self
@dygraph_only
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册