| Files | Last commit | Last update |
|---|---|---|
| 1 month ago | ||
| 11 days ago | ||
| 2 months ago | ||
| 11 days ago | ||
| 3 months ago | ||
| 27 days ago | ||
| 11 days ago | ||
| 1 month ago | ||
| 5 days ago |
ComplexAbs
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 absolute value (magnitude) of each element in the input complex tensor.
-
Computation formula:
For the complex input xi=ai+bi⋅jx_i = a_i + b_i \cdot j, the magnitude is output:
yi=∣xi∣=ai2+bi2y_{i}=|x_{i}|=\sqrt{a_{i}^{2}+b_{i}^{2}}
Parameter Description
| Parameter Name | Input/Output/Attribute | Description | Data Type | Data Format |
|---|---|---|---|---|
| x | Input | Input parameter for the complex absolute value computation, which is the input tensor x in the formula. | COMPLEX32, COMPLEX64, COMPLEX128 | ND |
| y | Output | Output parameter for the complex absolute value computation, which is the output tensor y in the formula. The output data type is determined by the input data type: FLOAT is output when the input is COMPLEX64, FLOAT16 is output when the input is COMPLEX32, and DOUBLE is output when the input is COMPLEX128. | FLOAT, FLOAT16, DOUBLE | ND |
| Tout | Attribute | Output data type. This attribute is retained for compatibility with the TensorFlow ComplexAbs operator and is currently not used. The output data type is deduced from the input data type. | Type, and the default value is DT_FLOAT | - |
Constraint Description
- The input supports only the COMPLEX32, COMPLEX64, and COMPLEX128 types, and other data types are not supported.
- The output data type is determined by the input data type and cannot be explicitly specified: COMPLEX64 corresponds to the FLOAT output, COMPLEX32 corresponds to the FLOAT16 output, and COMPLEX128 corresponds to the DOUBLE output.
- The shapes of the input and output are the same. Dynamic shape (DynamicShape) and dynamic dimension (DynamicRank) are supported.
- Empty tensors (with 0 in the shape) are not supported.
- The data format supports ND. Non-contiguous tensors are supported, and the number of dimensions is not greater than 8.
Invocation Description
| Invocation Method | Invocation Sample | Description |
|---|---|---|
| Graph-mode invocation | operator IR | Invokes the ComplexAbs operator by building a graph through the operator IR. |