From 6c15247291fcc2d80f8a1f440797abb9b26aa1c1 Mon Sep 17 00:00:00 2001 From: Zenghui Yuan <56808883+huizyuan@users.noreply.github.com> Date: Tue, 25 Apr 2023 17:26:36 +0800 Subject: [PATCH] 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 --- python/paddle/fluid/framework.py | 9 ++++++--- python/paddle/tensor/math.py | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/python/paddle/fluid/framework.py b/python/paddle/fluid/framework.py index 63ab3a65bb6..cab57eae045 100644 --- a/python/paddle/fluid/framework.py +++ b/python/paddle/fluid/framework.py @@ -718,7 +718,8 @@ def is_compiled_with_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: .. code-block:: python @@ -733,7 +734,8 @@ def is_compiled_with_cuda(): """ 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: .. code-block:: python @@ -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). - Returns (bool): `True` if ROCm is currently available, otherwise `False`. + Returns: + Bool: `True` if ROCm is currently available, otherwise `False`. Examples: .. code-block:: python diff --git a/python/paddle/tensor/math.py b/python/paddle/tensor/math.py index 9f5212abf91..ece8463f35e 100644 --- a/python/paddle/tensor/math.py +++ b/python/paddle/tensor/math.py @@ -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): """ - 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`` has larger dimensions, diagonals be taken from the 2D planes specified by axis1 and axis2. -- GitLab