From 202471fcd4e80b825d763e1dd71351cc3263a3d0 Mon Sep 17 00:00:00 2001 From: zhangting2020 <709968123@qq.com> Date: Sun, 27 Sep 2020 02:49:00 +0000 Subject: [PATCH] modify docs of CPUPlace and CUDAPinnedPlace, test=document_fix --- paddle/fluid/pybind/pybind.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/paddle/fluid/pybind/pybind.cc b/paddle/fluid/pybind/pybind.cc index 04087cb241c..4f9d47d560f 100644 --- a/paddle/fluid/pybind/pybind.cc +++ b/paddle/fluid/pybind/pybind.cc @@ -1438,13 +1438,13 @@ All parameter, weight, gradient are variables in Paddle. py::class_(m, "CPUPlace", R"DOC( CPUPlace is a descriptor of a device. - It represents a CPU device allocated or to be allocated with Tensor or LoDTensor. + It represents a CPU device on which a tensor will be allocated and a model will run. Examples: .. code-block:: python - import paddle.fluid as fluid - cpu_place = fluid.CPUPlace() + import paddle + cpu_place = paddle.CPUPlace() )DOC") .def(py::init<>()) @@ -1468,8 +1468,8 @@ All parameter, weight, gradient are variables in Paddle. Examples: .. code-block:: python - import paddle.fluid as fluid - place = fluid.CUDAPinnedPlace() + import paddle + place = paddle.CUDAPinnedPlace() )DOC") .def("__init__", -- GitLab