未验证 提交 27870412 编写于 作者: S songyouwei 提交者: GitHub

bug fix (#23193)

test=develop
上级 b8886bf1
......@@ -105,8 +105,9 @@ def enable_dygraph(place=None):
print(fluid.in_dygraph_mode()) # False
"""
global _functional_dygraph_context_manager
_functional_dygraph_context_manager = guard(place=place)
_functional_dygraph_context_manager.__enter__()
if _functional_dygraph_context_manager is None:
_functional_dygraph_context_manager = guard(place=place)
_functional_dygraph_context_manager.__enter__()
def disable_dygraph():
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册