diff --git a/python/paddle/framework/framework.py b/python/paddle/framework/framework.py index 93056a60c371c3889868ac200f278406688bdee8..e9d690c28d60ec84cc53e7b21ec34b983828d350 100644 --- a/python/paddle/framework/framework.py +++ b/python/paddle/framework/framework.py @@ -87,8 +87,6 @@ def get_default_dtype(): @contextmanager def set_grad_enabled(mode): """ - :api_attr: imperative - Create a context which enables or disables dygraph gradient calculation. Args: @@ -96,6 +94,7 @@ def set_grad_enabled(mode): Examples: .. code-block:: python + import paddle x = paddle.ones([3, 2]) x.stop_gradient = False