The input data
axis : None or int or tuple of int
- Axis or axes along which a argmin operation is performed.
- The default, axis=None, will find the indices of maximum element all of the elements of
+ Axis or axes along which a argmax operation is performed.
+ The default, axis=None, will find the indices of the maximum element of the elements of
the input array. If axis is negative it counts from the last to the first axis.
keepdims : bool
The input data
axis : None or int or tuple of int
- Axis or axes along which a argmin operation is performed.
- The default, axis=None, will find the indices of minimum element all of the elements of
- the input array. If axis is negative it counts from the last to the first axis.
+ Axis or axes along which a sum is performed. The default, axis=None,
+ will sum all of the elements of the input array. If axis is
+ negative it counts from the last to the first axis.
keepdims : bool
- 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 input array.
+ 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 input array.
exclude : bool
If `exclude` is true, reduction will be performed on the axes that are
result : relay.Expr
The computed result.
"""
- axis = [axis] if isinstance(axis, int) else axis
+ axis = [axis] if axis and isinstance(axis, int) else axis
return _make.sum(data, axis, keepdims, exclude)
The input data
axis : None or int or tuple of int
- Axis or axes along which a argmin operation is performed.
- The default, axis=None, will find the indices of minimum element all of the elements of
- the input array. If axis is negative it counts from the last to the first axis.
+ Axis or axes along which the max operation is performed.
+ The default, axis=None, will find the max element from all of the elements of the input
+ array. If axis is negative it counts from the last to the first axis.
keepdims : bool
If this is set to True, the axes which are reduced are left in the result as dimensions
The input data
axis : None or int or tuple of int
- Axis or axes along which a argmin operation is performed.
- The default, axis=None, will find the indices of minimum element all of the elements of
- the input array. If axis is negative it counts from the last to the first axis.
+ Axis or axes along which a minimum operation is performed.
+ The default, axis=None, will find the minimum element from all
+ of the elements of the input array. If axis is negative it counts from
+ the last to the first axis.
keepdims : bool
If this is set to True, the axes which are reduced are left in the result as dimensions
The input data
axis : None or int or tuple of int
- Axis or axes along which a argmin operation is performed.
+ Axis or axes along which a mean operation is performed.
The default, axis=None, will find the indices of minimum element all of the elements of
the input array. If axis is negative it counts from the last to the first axis.
The input data
axis : None or int or tuple of int
- Axis or axes along which a argmin operation is performed.
+ Axis or axes along which a product is performed.
The default, axis=None, will find the indices of minimum element all of the elements of
the input array. If axis is negative it counts from the last to the first axis.
[relay.prod, np.prod],
[relay.argmin, _with_keepdims(np.argmin)],
[relay.argmax, _with_keepdims(np.argmax)]]:
+ verify_reduce(func, (d1, d2, d3, d4), None, False, False, ())
verify_reduce(func, (d1, d2, d3, d4), 2, True, False, (d1, d2, 1, d4))
verify_reduce(func, (d1, d2, d3), 1, True, False, (d1, 1, d3))
verify_reduce(func, (d1, d2, d3), None, True, False, (1, 1, 1))