From c425cf182210b70be955ca8b4f6d5c4ddd612b4d Mon Sep 17 00:00:00 2001 From: Wilber Date: Sat, 10 Oct 2020 17:18:30 +0800 Subject: [PATCH] [API 2.0]Update 2.0 api from fluid to paddle (#27802) --- python/paddle/fluid/executor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/paddle/fluid/executor.py b/python/paddle/fluid/executor.py index 7d067b63478..f5660c3fc91 100644 --- a/python/paddle/fluid/executor.py +++ b/python/paddle/fluid/executor.py @@ -54,11 +54,11 @@ def global_scope(): Examples: .. code-block:: python - import paddle.fluid as fluid + import paddle import numpy - fluid.global_scope().var("data").get_tensor().set(numpy.ones((2, 2)), fluid.CPUPlace()) - numpy.array(fluid.global_scope().find_var("data").get_tensor()) + paddle.static.global_scope().var("data").get_tensor().set(numpy.ones((2, 2)), paddle.CPUPlace()) + numpy.array(paddle.static.global_scope().find_var("data").get_tensor()) """ return g_scope -- GitLab