FilesLast commitLast update
2 months ago
3 months ago
17 days ago
18 days ago
18 days ago
18 days ago
5 days ago
25 days ago
21 days ago
5 days ago
README

SquaredDifference

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: subtracts the second input tensor from the first input tensor, and computes the square of the result.

  • Computation formula:

    y=(x1−x2)∗(x1−x2)=(x1−x2)2y = (x1 - x2) * (x1 - x2) = (x1 - x2)^2

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
x1 Input 1 The input tensor x1 in the formula. BFLOAT16, FLOAT16, FLOAT, INT32, INT64 ND
x2 Input 2 The input tensor x2 in the formula. BFLOAT16, FLOAT16, FLOAT, INT32, INT64 ND
y Output The output tensor y in the formula. BFLOAT16, FLOAT16, FLOAT, INT32, INT64 ND
  • Atlas training products and Atlas inference products: BFLOAT16 is not supported.

Invocation Description

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