Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
d320f322
提交
d320f322
authored
6月 18, 2012
作者:
Eric Larsen
提交者:
Frederic
7月 04, 2012
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ajout keepdims, fonction std; correction any et all
上级
1284d324
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
62 行增加
和
15 行删除
+62
-15
basic.txt
doc/library/tensor/basic.txt
+62
-15
没有找到文件。
doc/library/tensor/basic.txt
浏览文件 @
d320f322
...
...
@@ -648,57 +648,75 @@ Reductions
==========
.. function:: max(x, axis=None)
.. function:: max(x, axis=None
, keepdims=False
)
:Parameter: *x* - symbolic Tensor (or compatible)
:Parameter: *axis* - axis along which to compute the maximum
:Parameter: *keepdims* - (boolean) If this is set to True, the axis which is reduced is
left in the result as a dimension with size one. With this option, the result
will broadcast correctly against the original tensor.
:Returns: the maximum value along a given axis
:note: see maximum for elemwise max
if axis=None, Theano 0.5rc1 or later: max over the flattened tensor (like numpy)
older: then axis is assumed to be ndim(x)-1
.. function:: argmax(x, axis=None)
.. function:: argmax(x, axis=None
, keepdims=False
)
:Parameter: *x* - symbolic Tensor (or compatible)
:Parameter: *axis* - axis along which to compute the maximum
:Parameter: *keepdims* - (boolean) If this is set to True, the axis which is reduced is
left in the result as a dimension with size one. With this option, the result
will broadcast correctly against the original tensor.
:Returns: the index of the maximum value along a given axis
if axis=None, Theano 0.5rc1 or later: argmax over the flattened tensor (like numpy)
older: then axis is assumed to be ndim(x)-1
.. function:: max_and_argmax(x, axis=None)
.. function:: max_and_argmax(x, axis=None
, keepdims=False
)
:Parameter: *x* - symbolic Tensor (or compatible)
:Parameter: *axis* - axis along which to compute the maximum
:Parameter: *keepdims* - (boolean) If this is set to True, the axis which is reduced is
left in the result as a dimension with size one. With this option, the result
will broadcast correctly against the original tensor.
:Returns: the maxium value along a given axis and its index.
if axis=None, Theano 0.5rc1 or later: max_and_argmax over the flattened tensor (like numpy)
older: then axis is assumed to be ndim(x)-1
.. function:: min(x, axis=None)
.. function:: min(x, axis=None
, keepdims=False
)
:Parameter: *x* - symbolic Tensor (or compatible)
:Parameter: *axis* - axis along which to compute the minimum
:Parameter: *keepdims* - (boolean) If this is set to True, the axis which is reduced is
left in the result as a dimension with size one. With this option, the result
will broadcast correctly against the original tensor.
:Returns: the minimum value along a given axis
:note: see miminum for elemwise min
if axis=None, Theano 0.5rc1 or later: min over the flattened tensor (like numpy)
older: then axis is assumed to be ndim(x)-1
.. function:: argmin(x, axis=None)
.. function:: argmin(x, axis=None
, keepdims=False
)
:Parameter: *x* - symbolic Tensor (or compatible)
:Parameter: *axis* - axis along which to compute the minimum
:Parameter: *keepdims* - (boolean) If this is set to True, the axes which are reduced are
left in the result as dimensions with size one. With this option, the result
will broadcast correctly against the original tensor.
:Returns: the index of the minimum value along a given axis
if axis=None, Theano 0.5rc1 or later: argmin over the flattened tensor (like numpy)
older: then axis is assumed to be ndim(x)-1
.. function:: sum(x, axis=None)
.. function:: sum(x, axis=None
, keepdims=False
)
:Parameter: *x* - symbolic Tensor (or compatible)
:Parameter: *axis* - axis or axes along which to compute the sum
:Parameter: *keepdims* - (boolean) If this is set to True, the axes which are reduced are
left in the result as dimensions with size one. With this option, the result
will broadcast correctly against the original tensor.
:Returns: sum of *x* along *axis*
axis can be:
...
...
@@ -706,10 +724,13 @@ Reductions
* an *int* - computed along this axis
* a *list of ints* - computed along these axes
.. function:: prod(x, axis=None)
.. function:: prod(x, axis=None
, keepdims=False
)
:Parameter: *x* - symbolic Tensor (or compatible)
:Parameter: *axis* - axis or axes along which to compute the product
:Parameter: *keepdims* - (boolean) If this is set to True, the axes which are reduced are
left in the result as dimensions with size one. With this option, the result
will broadcast correctly against the original tensor.
:Returns: product of every term in *x* along *axis*
axis can be:
...
...
@@ -717,10 +738,13 @@ Reductions
* an *int* - computed along this axis
* a *list of ints* - computed along these axes
.. function:: mean(x, axis=None)
.. function:: mean(x, axis=None
, keepdims=False
)
:Parameter: *x* - symbolic Tensor (or compatible)
:Parameter: *axis* - axis or axes along which to compute the mean
:Parameter: *keepdims* - (boolean) If this is set to True, the axes which are reduced are
left in the result as dimensions with size one. With this option, the result
will broadcast correctly against the original tensor.
:Returns: mean value of *x* along *axis*
axis can be:
...
...
@@ -728,36 +752,59 @@ Reductions
* an *int* - computed along this axis
* a *list of ints* - computed along these axes
.. function:: var(x, axis=None)
.. function:: var(x, axis=None
, keepdims=False
)
:Parameter: *x* - symbolic Tensor (or compatible)
:Parameter: *axis* - axis or axes along which to compute the variance
:Parameter: *keepdims* - (boolean) If this is set to True, the axes which are reduced are
left in the result as dimensions with size one. With this option, the result
will broadcast correctly against the original tensor.
:Returns: variance of *x* along *axis*
axis can be:
* *None* -
variance
computed along all axes (like numpy)
* *None* -
in which case the variance is
computed along all axes (like numpy)
* an *int* - computed along this axis
* a *list of ints* - computed along these axes
.. function::
all(x, axis=Non
e)
.. function::
std(x, axis=None, keepdims=Fals
e)
:Parameter: *x* - symbolic Tensor (or compatible)
:Parameter: *axis* - axis or axes along which to apply bitwise and
:Parameter: *axis* - axis or axes along which to compute the standard deviation
:Parameter: *keepdims* - (boolean) If this is set to True, the axes which are reduced are
left in the result as dimensions with size one. With this option, the result
will broadcast correctly against the original tensor.
:Returns: variance of *x* along *axis*
axis can be:
* *None* - in which case the standard deviation is computed along all axes (like numpy)
* an *int* - computed along this axis
* a *list of ints* - computed along these axes
.. function:: all(x, axis=None, keepdims=False)
:Parameter: *x* - symbolic Tensor (or compatible)
:Parameter: *axis* - axis or axes along which to apply 'bitwise and'
:Parameter: *keepdims* - (boolean) If this is set to True, the axes which are reduced are
left in the result as dimensions with size one. With this option, the result
will broadcast correctly against the original tensor.
:Returns: bitwise and of *x* along *axis*
axis can be:
* *None* - computed along all axes (like numpy)
* *None* -
in which case the 'bitwise and' is
computed along all axes (like numpy)
* an *int* - computed along this axis
* a *list of ints* - computed along these axes
.. function:: any(x, axis=None)
.. function:: any(x, axis=None
, keepdims=False
)
:Parameter: *x* - symbolic Tensor (or compatible)
:Parameter: *axis* - axis or axes along which to apply bitwise or
:Parameter: *keepdims* - (boolean) If this is set to True, the axes which are reduced are
left in the result as dimensions with size one. With this option, the result
will broadcast correctly against the original tensor.
:Returns: bitwise or of *x* along *axis*
axis can be:
* *None* - computed along all axes (like numpy)
* *None* -
in which case the 'bitwise or' is
computed along all axes (like numpy)
* an *int* - computed along this axis
* a *list of ints* - computed along these axes
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论