未验证 提交 09e5b00c 编写于 作者: J Jiabin Yang 提交者: GitHub

Fix in dygraph mode doc (#40942)

* fix doc for enable api

* test=document_fix
上级 02146ba5
......@@ -139,8 +139,8 @@ def enabled():
and :ref:`api_fluid_dygraph_disable_dygraph` api .
**Note**:
``fluid.dygraph.enabled`` is the alias of ``fluid._non_static_mode``, and
``fluid._non_static_mode`` is recommended to use.
``fluid.dygraph.enabled`` is the alias of ``fluid.in_dygraph_mode``, and
``fluid.in_dygraph_mode`` is recommended to use for now.
Returns:
bool: Whether the program is running in dynamic graph mode.
......@@ -155,6 +155,7 @@ def enabled():
fluid.disable_dygraph()
print(fluid.dygraph.enabled()) # False
"""
# TODO(jiabin): Make this check as in_dygraph_mode when we support default eager mode.
return framework._non_static_mode()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册