Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
7049f301
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
7049f301
编写于
4月 20, 2020
作者:
D
danleifeng
提交者:
GitHub
4月 20, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix example bug;test=develop (#23893)
上级
87d8dc3d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
4 deletion
+11
-4
python/paddle/tensor/creation.py
python/paddle/tensor/creation.py
+4
-1
python/paddle/tensor/linalg.py
python/paddle/tensor/linalg.py
+2
-2
python/paddle/tensor/math.py
python/paddle/tensor/math.py
+5
-1
未找到文件。
python/paddle/tensor/creation.py
浏览文件 @
7049f301
...
...
@@ -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
...
...
python/paddle/tensor/linalg.py
浏览文件 @
7049f301
...
...
@@ -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 float
16, float
32, 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 float
16, float
32, float64, int32, int64.
For Example:
.. code-block:: text
...
...
python/paddle/tensor/math.py
浏览文件 @
7049f301
...
...
@@ -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
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录