Count the frequency of each value in an array of non-negative ints.
tch_bincount(x, weights = NULL, minlength = 0)
x | tensor object |
---|---|
weights | optional, weight for each value in the input tensor. Should be of same size as input tensor. |
minlength | optional, minimum number of bins. Should be non-negative. |
#> tensor #> 5 #> 2 #> 4 #> 4 #> 3 #> 7 #> 9 #> 6 #> 4 #> 6 #> [ Variable[CPULongType]{10} ]