From 5d47916bb8664de06b85fb313a59dc0e29baff46 Mon Sep 17 00:00:00 2001 From: zhangting2020 <709968123@qq.com> Date: Sun, 27 Sep 2020 11:38:27 +0000 Subject: [PATCH] update docs of place APIs --- doc/paddle/api/paddle/fluid/core/CPUPlace_cn.rst | 6 +++--- doc/paddle/api/paddle/fluid/core/CUDAPinnedPlace_cn.rst | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/paddle/api/paddle/fluid/core/CPUPlace_cn.rst b/doc/paddle/api/paddle/fluid/core/CPUPlace_cn.rst index e091352c9..a5127cb81 100644 --- a/doc/paddle/api/paddle/fluid/core/CPUPlace_cn.rst +++ b/doc/paddle/api/paddle/fluid/core/CPUPlace_cn.rst @@ -8,13 +8,13 @@ CPUPlace -``CPUPlace`` 是一个设备描述符,表示一个分配或将要分配 ``Tensor`` 或 ``LoDTensor`` 的 ``CPU`` 设备。 +``CPUPlace`` 是一个设备描述符,指定 ``CPUPlace`` 则 ``Tensor`` 将被自动分配在该设备上,并且模型将会运行在该设备上。 **代码示例** .. code-block:: python - import paddle.fluid as fluid - cpu_place = fluid.CPUPlace() + import paddle + cpu_place = paddle.CPUPlace() diff --git a/doc/paddle/api/paddle/fluid/core/CUDAPinnedPlace_cn.rst b/doc/paddle/api/paddle/fluid/core/CUDAPinnedPlace_cn.rst index a3e669344..2e6f8a191 100644 --- a/doc/paddle/api/paddle/fluid/core/CUDAPinnedPlace_cn.rst +++ b/doc/paddle/api/paddle/fluid/core/CUDAPinnedPlace_cn.rst @@ -15,6 +15,6 @@ CUDAPinnedPlace .. code-block:: python - import paddle.fluid as fluid - place = fluid.CUDAPinnedPlace() + import paddle + place = paddle.CUDAPinnedPlace() -- GitLab