From 09e5b00ce35f47498c50ec796e4e924126d0fca1 Mon Sep 17 00:00:00 2001 From: Jiabin Yang <360788950@qq.com> Date: Fri, 25 Mar 2022 18:17:49 +0800 Subject: [PATCH] Fix in dygraph mode doc (#40942) * fix doc for enable api * test=document_fix --- python/paddle/fluid/dygraph/base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/dygraph/base.py b/python/paddle/fluid/dygraph/base.py index eb4d87b519..6e61f998b2 100644 --- a/python/paddle/fluid/dygraph/base.py +++ b/python/paddle/fluid/dygraph/base.py @@ -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() -- GitLab