tensor.reduce_prod
tensor.reduce_prod
Reduces a tensor by multiplying its elements along a specified axis.
Args
self
(@Tensor<T>
) - The input tensor.axis
(usize
) - The dimension to reduce.keepdims
(bool
) - If true, retains reduced dimensions with length 1.
Panics
Panics if axis is not in the range of the input tensor's dimensions.
Returns
A new Tensor<T>
instance with the specified axis reduced by multiplying its elements.
Examples
Last updated