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

my_2.0rc
Wilber 4 years ago committed by GitHub
parent 1bada985fc
commit c425cf1822
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save