提交 d320f322 authored 作者: Eric Larsen's avatar Eric Larsen 提交者: Frederic

ajout keepdims, fonction std; correction any et all

上级 1284d324
...@@ -648,57 +648,75 @@ Reductions ...@@ -648,57 +648,75 @@ Reductions
========== ==========
.. function:: max(x, axis=None) .. function:: max(x, axis=None, keepdims=False)
:Parameter: *x* - symbolic Tensor (or compatible) :Parameter: *x* - symbolic Tensor (or compatible)
:Parameter: *axis* - axis along which to compute the maximum :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 :Returns: the maximum value along a given axis
:note: see maximum for elemwise max :note: see maximum for elemwise max
if axis=None, Theano 0.5rc1 or later: max over the flattened tensor (like numpy) 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 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: *x* - symbolic Tensor (or compatible)
:Parameter: *axis* - axis along which to compute the maximum :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 :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) 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 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: *x* - symbolic Tensor (or compatible)
:Parameter: *axis* - axis along which to compute the maximum :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. :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) 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 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: *x* - symbolic Tensor (or compatible)
:Parameter: *axis* - axis along which to compute the minimum :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 :Returns: the minimum value along a given axis
:note: see miminum for elemwise min :note: see miminum for elemwise min
if axis=None, Theano 0.5rc1 or later: min over the flattened tensor (like numpy) 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 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: *x* - symbolic Tensor (or compatible)
:Parameter: *axis* - axis along which to compute the minimum :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 :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) 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 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: *x* - symbolic Tensor (or compatible)
:Parameter: *axis* - axis or axes along which to compute the sum :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* :Returns: sum of *x* along *axis*
axis can be: axis can be:
...@@ -706,10 +724,13 @@ Reductions ...@@ -706,10 +724,13 @@ Reductions
* an *int* - computed along this axis * an *int* - computed along this axis
* a *list of ints* - computed along these axes * 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: *x* - symbolic Tensor (or compatible)
:Parameter: *axis* - axis or axes along which to compute the product :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* :Returns: product of every term in *x* along *axis*
axis can be: axis can be:
...@@ -717,10 +738,13 @@ Reductions ...@@ -717,10 +738,13 @@ Reductions
* an *int* - computed along this axis * an *int* - computed along this axis
* a *list of ints* - computed along these axes * 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: *x* - symbolic Tensor (or compatible)
:Parameter: *axis* - axis or axes along which to compute the mean :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* :Returns: mean value of *x* along *axis*
axis can be: axis can be:
...@@ -728,36 +752,59 @@ Reductions ...@@ -728,36 +752,59 @@ Reductions
* an *int* - computed along this axis * an *int* - computed along this axis
* a *list of ints* - computed along these axes * 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: *x* - symbolic Tensor (or compatible)
:Parameter: *axis* - axis or axes along which to compute the variance :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* :Returns: variance of *x* along *axis*
axis can be: 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 * an *int* - computed along this axis
* a *list of ints* - computed along these axes * a *list of ints* - computed along these axes
.. function:: all(x, axis=None) .. function:: std(x, axis=None, keepdims=False)
:Parameter: *x* - symbolic Tensor (or compatible) :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* :Returns: bitwise and of *x* along *axis*
axis can be: 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 * an *int* - computed along this axis
* a *list of ints* - computed along these axes * 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: *x* - symbolic Tensor (or compatible)
:Parameter: *axis* - axis or axes along which to apply bitwise or :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* :Returns: bitwise or of *x* along *axis*
axis can be: 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 * an *int* - computed along this axis
* a *list of ints* - computed along these axes * a *list of ints* - computed along these axes
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论