FilesLast commitLast update
11 days ago
2 months ago
3 months ago
12 days ago
14 days ago
12 days ago
2 months ago
6 months ago
12 days ago
12 days ago
1 month ago
12 days ago
README

Neg

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 opposite number of each element in the input.

  • Computation formula:

    outputi=(−1)∗selfi output_i = (-1) * self_i

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
x Input Output tensor self in the formula. BFLOAT16, FLOAT16, FLOAT, DOUBLE, INT32, INT8, INT64, COMPLEX64, COMPLEX128 ND
y Output Negated output, which is the output tensor output in the formula. BFLOAT16, FLOAT16, FLOAT, DOUBLE, INT32, INT8, INT64, COMPLEX64, COMPLEX128 ND

Constraint Description

None

Invocation Description

Invocation Method Invocation Sample Description
aclnn invocation test_aclnn_neg Invokes the Neg operator through the aclnnNeg API.
Graph-mode invocation test_geir_neg Invokes the Neg operator by building a graph through the operator IR.