The input tensor to compute the product over. If the dtype is bool
it will be converted to int32
and the output dtype will be int32
.
Optional
axis: number | number[]The dimension(s) to reduce. By default it reduces all dimensions.
Optional
keepDims: booleanIf true, retains reduced dimensions with size 1.
Generated using TypeDoc
Computes the product of elements across dimensions of a
tf.Tensor
.Reduces the input along the dimensions given in
axes
. UnlesskeepDims
is true, the rank of thetf.Tensor
is reduced by 1 for each entry inaxes
. IfkeepDims
is true, the reduced dimensions are retained with length 1. Ifaxes
has no entries, all dimensions are reduced, and atf.Tensor
with a single element is returned.