FilesLast commitLast update
16 days ago
20 days ago
3 months ago
16 days ago
20 days ago
1 month ago
14 days ago
README

AbsGrad

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 gradient of the absolute value function (Abs). It computes the downstream gradient z based on the forward input tensor y and the upstream gradient dy.

  • Computation formula:

zi=dyi×sign(yi)z_i=dy_i \times sign(y_i)

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
y Input Input of the original Abs operator, which is yi in the formula. BFLOAT16, FLOAT16, FLOAT ND
dy Input Upstream gradient of the output of the Abs operator, which is dyi in the formula. BFLOAT16, FLOAT16, FLOAT ND
z Output Downstream gradient of the input of the Abs operator, which is zi in the formula. BFLOAT16, FLOAT16, FLOAT ND
  • Atlas training products and Atlas inference products: BFLOAT16 is not supported.

Constraint Description

  • The data types of y, dy, and z must be the same.
  • The shapes of all inputs and outputs cannot contain 0 (empty tensors are not supported).

Third-Party Framework Compatibility

  • Compatible with the AbsGrad operator of TensorFlow.

Invocation Description

Invocation Method Invocation Sample Description
Graph-mode invocation - Invokes the AbsGrad operator by building a graph through the operator IR.