FilesLast commitLast update
4 days ago
2 months ago
3 months ago
8 months ago
8 days ago
29 days ago
1 month ago
2 months ago
29 days ago
4 days ago
4 days ago
README

Bincount

English | 简体中文

Product Support Status

Product Supported
Ascend 950PR&950DT products √
Atlas A3 products √
Atlas A2 products √
Atlas 200I/500 A2 inference products ×
Atlas inference products √
Atlas training products √

Function Description

  • Operator function: computes the frequency of each number in an array of non-negative integers. minlength is the minimum size of the output tensor. When weights is a null pointer, the frequency increases by 1 each time self[i] in self occurs. When weights is not empty, the frequency increases by weights[i] each time self[i] occurs. The result is finally stored at index self[i] in out. Therefore, the size of out is the maximum of (the maximum value in self + 1) and minlength.

  • Computation formula:

    If n is the value of self at position i and weights is specified:

    out[selfi]=out[selfi]+weightsiout[self_i] = out[self_i] + weights_i

    Otherwise:

    out[selfi]=out[selfi]+1out[self_i] = out[self_i] + 1

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
array Input Input tensor, which is self_i in the formula. INT32 ND
size Input Specifies the minimum length of the output tensor. INT32 ND
weights Input Weight of the input tensor, which is weights_i in the formula. FLOAT ND
bins Output Output tensor, which is out_i in the formula. FLOAT ND

Constraint Description

  • The value of the input size must be greater than or equal to the maximum value of the input array plus 1
  • The length of the output bins must be equal to the value of size

Invocation Description

Invocation Method Invocation Sample Description
aclnn invocation test_aclnn_bincount Invokes the Bincount operator through the aclnnBincount API.