diff --git a/python/paddle/fluid/framework.py b/python/paddle/fluid/framework.py index 63ab3a65bb6b93d6bb4210e474a16f7f4571880c..cab57eae045b3a95db1e9c237ff09a5330c2204e 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 9f5212abf914751da286a005b0e2c8c6da214357..ece8463f35e6397a42defd53af020cb7d8d4c886 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.