FilesLast commitLast update
17 days ago
10 months ago
1 month ago
9 months ago
7 days ago
3 months ago
3 months ago
28 days ago
1 month ago
9 days ago
README

ReduceStdV2

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 standard deviation of the specified dimension (dim). This dim can be a single dimension, a dimension list, or None.

  • Computation formula: Assume that dim is ii, and the computation is performed on this dimension. NN is the shape of this dimension. Take selfiself_{i} and compute the mean value xiˉ\bar{x_{i}} on this dimension.

    out=1max(0,N−δN)∑j=0N−1(selfij−xiˉ)2out = \sqrt{\frac{1}{max(0, N - \delta N)}\sum_{j=0}^{N-1}(self_{ij}-\bar{x_{i}})^2}

    When keepdim = true, the dimension is retained after the reduction, and the value of this dimension in the output shape is 1. When keepdim = false, the dimension is not retained.

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
self Input Input tensor for the ReduceStdV2 computation, which is self in the formula. FLOAT, FLOAT16, BFLOAT16 ND
dim Input Dimension that participates in the Reduce computation, which is i in the formula. INT64 ND
correction Input Correction value, which is delta in the formula. INT32 ND
keepdim Input Specifies whether to retain the dimensions of the input tensor in the output tensor. BOOL ND
out Output Output parameter of the ReduceStdV2 computation, which is out in the formula. FLOAT, FLOAT16, BFLOAT16 ND
  • Atlas training products and Atlas inference products: BFLOAT16 is not supported.

Constraint Description

None

Invocation Description

Invocation Method Invocation Sample Description
aclnn invocation test_aclnn_std.cpp Invokes the ReduceStdV2 operator through the aclnnStd API.