未验证 提交 7049f301 编写于 作者: D danleifeng 提交者: GitHub

fix example bug;test=develop (#23893)

上级 87d8dc3d
......@@ -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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册