axis - axis or axes along which to compute the sum
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.
Axis or axes along which a sum is performed. The default (axis = None) is perform a sum over all the dimensions of the input array. axis may be negative, in which case it counts from the last to the first axis.
New in version 1.7.0.
If this is a tuple of ints, a sum is performed on multiple axes, instead of a single axis or all the axes as before.
keepdims : bool, optional
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 arr.
您可以在deeplearning.net中找到有关theano(keras后端之一)的文档和教程
有关方法
theano.tensor.sum
,请参见here正如EoinS所指出的,theano函数与numpy的函数非常相似。在
这些不是
keras
特定的参数,而是numpy.sum
参数。在here is the source
相关问题 更多 >
编程相关推荐