sponge.function.reduce_prod
- sponge.function.reduce_prod(x: Tensor, axis: Union[int, Tuple[int], List[int]] = ())[source]
Reduces a dimension of a tensor by multiplying all elements in the dimension, by default. And also can reduce a dimension of x along the axis. See mindspore.ops.ReduceProd for detailed information.
- Parameters
x (Tensor[Number]) – The input tensor. The dtype of the tensor to be reduced is number. \((N,*)\) where \(*\) means, any number of additional dimensions, its rank should be less than 8.
axis (Union[int, tuple(int), list(int)]) – The dimensions to reduce. Default: (), reduce all dimensions. Only constant value is allowed. Must be in the range [-r, r).
- Outputs:
Tensor, has the same dtype as the x.
- Supported Platforms:
Ascend
GPU
CPU