Counts the number of occurrences of each value in an integer array.
tf.raw_ops.DenseBincount(
input, size, weights, binary_output=False, name=None
)
Outputs a vector with length size
and the same dtype as weights
. If
weights
are empty, then index i
stores the number of times the value i
is
counted in arr
. If weights
are non-empty, then index i
stores the sum of
the value in weights
at each index where the corresponding value in arr
is
i
.
Values in arr
outside of the range [0, size) are ignored.
Returns | |
---|---|
A Tensor . Has the same type as weights .
|