未验证 提交 c425cf18 编写于 作者: W Wilber 提交者: GitHub

[API 2.0]Update 2.0 api from fluid to paddle (#27802)

上级 1bada985
...@@ -54,11 +54,11 @@ def global_scope(): ...@@ -54,11 +54,11 @@ def global_scope():
Examples: Examples:
.. code-block:: python .. code-block:: python
import paddle.fluid as fluid import paddle
import numpy import numpy
fluid.global_scope().var("data").get_tensor().set(numpy.ones((2, 2)), fluid.CPUPlace()) paddle.static.global_scope().var("data").get_tensor().set(numpy.ones((2, 2)), paddle.CPUPlace())
numpy.array(fluid.global_scope().find_var("data").get_tensor()) numpy.array(paddle.static.global_scope().find_var("data").get_tensor())
""" """
return g_scope return g_scope
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册