未验证 提交 6c152472 编写于 作者: Z Zenghui Yuan 提交者: GitHub

Fix some problems in Paddle english instruction doc files. (#53145)

* Fix some problems in Paddle english instruction doc files.

* fix some new questions

* fix cn doc problems, test=document_fix
上级 dda6b9d5
...@@ -718,7 +718,8 @@ def is_compiled_with_cinn(): ...@@ -718,7 +718,8 @@ def is_compiled_with_cinn():
""" """
Whether this whl package can be used to run the model on CINN. Whether this whl package can be used to run the model on CINN.
Returns (bool): `True` if CINN is currently available, otherwise `False`. Returns:
Bool: `True` if CINN is currently available, otherwise `False`.
Examples: Examples:
.. code-block:: python .. code-block:: python
...@@ -733,7 +734,8 @@ def is_compiled_with_cuda(): ...@@ -733,7 +734,8 @@ def is_compiled_with_cuda():
""" """
Whether this whl package can be used to run the model on GPU. Whether this whl package can be used to run the model on GPU.
Returns (bool): `True` if CUDA is currently available, otherwise `False`. Returns:
Bool: `True` if CUDA is currently available, otherwise `False`.
Examples: Examples:
.. code-block:: python .. code-block:: python
...@@ -748,7 +750,8 @@ def is_compiled_with_rocm(): ...@@ -748,7 +750,8 @@ def is_compiled_with_rocm():
""" """
Whether this whl package can be used to run the model on AMD or Hygon GPU(ROCm). Whether this whl package can be used to run the model on AMD or Hygon GPU(ROCm).
Returns (bool): `True` if ROCm is currently available, otherwise `False`. Returns:
Bool: `True` if ROCm is currently available, otherwise `False`.
Examples: Examples:
.. code-block:: python .. code-block:: python
......
...@@ -3057,7 +3057,7 @@ def trace(x, offset=0, axis1=0, axis2=1, name=None): ...@@ -3057,7 +3057,7 @@ def trace(x, offset=0, axis1=0, axis2=1, name=None):
def diagonal(x, offset=0, axis1=0, axis2=1, name=None): def diagonal(x, offset=0, axis1=0, axis2=1, name=None):
""" """
This OP computes the diagonals of the input tensor x. Computes the diagonals of the input tensor x.
If ``x`` is 2D, returns the diagonal. If ``x`` is 2D, returns the diagonal.
If ``x`` has larger dimensions, diagonals be taken from the 2D planes specified by axis1 and axis2. If ``x`` has larger dimensions, diagonals be taken from the 2D planes specified by axis1 and axis2.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册