From f23eeeb460d27ee8fd0b62ae79082fd688af3443 Mon Sep 17 00:00:00 2001 From: chengduo <30176695+chengduoZH@users.noreply.github.com> Date: Fri, 11 Oct 2019 06:05:06 -0500 Subject: [PATCH] update global scope doc (#20483) test=document_fix --- paddle/fluid/API.spec | 2 +- python/paddle/fluid/executor.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/paddle/fluid/API.spec b/paddle/fluid/API.spec index 1913b1b34af..926d9601ea2 100644 --- a/paddle/fluid/API.spec +++ b/paddle/fluid/API.spec @@ -33,7 +33,7 @@ paddle.fluid.Executor.close (ArgSpec(args=['self'], varargs=None, keywords=None, paddle.fluid.Executor.infer_from_dataset (ArgSpec(args=['self', 'program', 'dataset', 'scope', 'thread', 'debug', 'fetch_list', 'fetch_info', 'print_period', 'fetch_handler'], varargs=None, keywords=None, defaults=(None, None, None, 0, False, None, None, 100, None)), ('document', '67de8ce7fbc618da50037d33cf7a7dbc')) paddle.fluid.Executor.run (ArgSpec(args=['self', 'program', 'feed', 'fetch_list', 'feed_var_name', 'fetch_var_name', 'scope', 'return_numpy', 'use_program_cache'], varargs=None, keywords=None, defaults=(None, None, None, 'feed', 'fetch', None, True, False)), ('document', 'de3878f012e60edad05fb24fd88ce910')) paddle.fluid.Executor.train_from_dataset (ArgSpec(args=['self', 'program', 'dataset', 'scope', 'thread', 'debug', 'fetch_list', 'fetch_info', 'print_period', 'fetch_handler'], varargs=None, keywords=None, defaults=(None, None, None, 0, False, None, None, 100, None)), ('document', 'f35879c6935d87255d4317c7d0d02ab6')) -paddle.fluid.global_scope (ArgSpec(args=[], varargs=None, keywords=None, defaults=None), ('document', 'f65788d9ead293ada47551339df12203')) +paddle.fluid.global_scope (ArgSpec(args=[], varargs=None, keywords=None, defaults=None), ('document', 'b8e1596c2d42738d0a7c0197912ae5aa')) paddle.fluid.scope_guard (ArgSpec(args=['scope'], varargs=None, keywords=None, defaults=None), ('document', '02fcfc1eda07c03a84ed62422366239c')) paddle.fluid.DistributeTranspiler ('paddle.fluid.transpiler.distribute_transpiler.DistributeTranspiler', ('document', '5152a3ed0544d4d9600fb53a73f15c38')) paddle.fluid.DistributeTranspiler.__init__ (ArgSpec(args=['self', 'config'], varargs=None, keywords=None, defaults=(None,)), ('document', '6adf97f83acf6453d4a6a4b1070f3754')) diff --git a/python/paddle/fluid/executor.py b/python/paddle/fluid/executor.py index f2d5cc3ffce..d61f9d9ad0d 100644 --- a/python/paddle/fluid/executor.py +++ b/python/paddle/fluid/executor.py @@ -42,6 +42,9 @@ def global_scope(): Get the global/default scope instance. There are a lot of APIs use :code:`global_scope` as its default value, e.g., :code:`Executor.run` + Returns: + Scope: The global/default scope instance. + Examples: .. code-block:: python @@ -50,9 +53,6 @@ def global_scope(): fluid.global_scope().var("data").get_tensor().set(numpy.ones((2, 2)), fluid.CPUPlace()) numpy.array(fluid.global_scope().find_var("data").get_tensor()) - - Returns: - Scope: The global/default scope instance. """ return g_scope -- GitLab