FilesLast commitLast update
22 days ago
2 months ago
3 days ago
8 days ago
3 days ago
1 month ago
3 days ago
3 months ago
1 month ago
14 days ago
README

HistogramV2

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 histogram of a tensor.
  • Computation formula: uses min and max as the upper and lower bounds of the statistics, divides the space between min and max into bins intervals of equal width, and counts the number of elements in tensor x in each interval. If min and max are equal, the minimum and maximum values of all elements in the tensor are used as the upper and lower bounds of the statistics. Elements smaller than min and greater than max are not counted.

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
x Input Input tensor x in the formula. FLOAT, FLOAT16, INT64, INT32, INT16, INT8, UINT8 ND
min Input Input tensor min in the formula, containing only 1 element. FLOAT, FLOAT16, INT64, INT32, INT16, INT8, UINT8 ND
max Input Input tensor max in the formula, containing only 1 element. FLOAT, FLOAT16, INT64, INT32, INT16, INT8, UINT8 ND
y Output Output tensor, which is the histogram computation result. INT32 ND
bins Optional attribute
  • Indicates the number of divided intervals.
  • The default value is 100.
INT -

Constraint Description

None

Invocation Description

Invocation Method Invocation Sample Description
aclnn invocation test_aclnn_histc Invokes the HistogramV2 operator through the aclnnHistc API.
Graph-mode invocation test_geir_histogram_v2 Invokes the HistogramV2 operator by building a graph through the operator IR.