未验证 提交 d2369dd9 编写于 作者: Z Zhang Ting 提交者: GitHub

modify docs of CPUPlace and CUDAPinnedPlace, test=document_fix (#27587)

上级 7c69e361
...@@ -1438,13 +1438,13 @@ All parameter, weight, gradient are variables in Paddle. ...@@ -1438,13 +1438,13 @@ All parameter, weight, gradient are variables in Paddle.
py::class_<paddle::platform::CPUPlace>(m, "CPUPlace", R"DOC( py::class_<paddle::platform::CPUPlace>(m, "CPUPlace", R"DOC(
CPUPlace is a descriptor of a device. 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: Examples:
.. code-block:: python .. code-block:: python
import paddle.fluid as fluid import paddle
cpu_place = fluid.CPUPlace() cpu_place = paddle.CPUPlace()
)DOC") )DOC")
.def(py::init<>()) .def(py::init<>())
...@@ -1468,8 +1468,8 @@ All parameter, weight, gradient are variables in Paddle. ...@@ -1468,8 +1468,8 @@ All parameter, weight, gradient are variables in Paddle.
Examples: Examples:
.. code-block:: python .. code-block:: python
import paddle.fluid as fluid import paddle
place = fluid.CUDAPinnedPlace() place = paddle.CUDAPinnedPlace()
)DOC") )DOC")
.def("__init__", .def("__init__",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册