diff --git a/python/paddle/tensor/creation.py b/python/paddle/tensor/creation.py index 64c82accd729adce52963397fd22091496d379b5..09cb6bec788057e914b02bacd6095b470c3ad64e 100644 --- a/python/paddle/tensor/creation.py +++ b/python/paddle/tensor/creation.py @@ -404,7 +404,8 @@ def eye(num_rows, name=None): """ **eye** - This function constructs an identity tensor, or a batch of tensor. + This function constructs an identity tensor. + Args: num_rows(int): the number of rows in each batch tensor. num_columns(int, optional): the number of columns in each batch tensor. @@ -417,8 +418,10 @@ def eye(num_rows, stop_gradient(bool, optional): Whether stop calculating gradients. Default:True. name(str, optional): The default value is None. Normally there is no need for user to set this property. For more information, please refer to :ref:`api_guide_Name` + Returns: Variable: An identity Tensor or LoDTensor of shape [num_rows, num_columns]. + Examples: .. code-block:: python import paddle diff --git a/python/paddle/tensor/linalg.py b/python/paddle/tensor/linalg.py index 76b459327cfec96b1e258fd58f333813b496687b..6597b5f8224e1f8dc7a7faf55fe327e74d39b77c 100644 --- a/python/paddle/tensor/linalg.py +++ b/python/paddle/tensor/linalg.py @@ -476,11 +476,11 @@ def t(input, name=None): the fluid.layers.transpose function which perm dimensions set 0 and 1. Args: - input (Variable): The input Tensor. It is a N-D (N<=2) Tensor of data types float32, float64, int32. + input (Variable): The input Tensor. It is a N-D (N<=2) Tensor of data types float16, float32, float64, int32. name(str, optional): The default value is None. Normally there is no need for user to set this property. For more information, please refer to :ref:`api_guide_Name` Returns: - Variable: A transposed n-D Tensor, with data type being float32, float64, int32, int64. + Variable: A transposed n-D Tensor, with data type being float16, float32, float64, int32, int64. For Example: .. code-block:: text diff --git a/python/paddle/tensor/math.py b/python/paddle/tensor/math.py index c4feb007a95082b932685372679ed351eba4431d..8eeabaa236ad75c277f6347f919d3ee761ba527b 100644 --- a/python/paddle/tensor/math.py +++ b/python/paddle/tensor/math.py @@ -1108,7 +1108,7 @@ def max(input, dim=None, keep_dim=False, out=None, name=None): .. code-block:: python import paddle import paddle.fluid as fluid - + # x is a Tensor variable with following elements: # [[0.2, 0.3, 0.5, 0.9] # [0.1, 0.2, 0.6, 0.7]] @@ -1158,6 +1158,7 @@ def max(input, dim=None, keep_dim=False, out=None, name=None): def min(input, dim=None, keep_dim=False, out=None, name=None): """ Computes the minimum of tensor elements over the given dimension. + Args: input (Variable): The input variable which is a Tensor, the data type is float32, float64, int32, int64. @@ -1175,9 +1176,11 @@ def min(input, dim=None, keep_dim=False, out=None, name=None): if out is None, a new Varibale will be create to store the result. name(str, optional): The default value is None. Normally there is no need for user to set this property. For more information, please refer to :ref:`api_guide_Name` + Returns: Variable: Tensor, result of minimum on the specified dim of input tensor, it's data type is the same as input's Tensor. + Examples: .. code-block:: python import paddle @@ -1242,6 +1245,7 @@ def log1p(x, out=None, name=None): user to set this property. For more information, please refer to :ref:`api_guide_Name` Returns: Variable: The natural log of the input LoDTensor or Tensor computed element-wise. + Examples: .. code-block:: python import paddle