FilesLast commitLast update
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
22 days ago
9 days ago
README

Constant

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

Creates a constant tensor for training. The Constant operator infers the shape and data type of the output tensor y based on the Tensor value and type stored in the value attribute. The output shape and data type are consistent with the Tensor in the value attribute.

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
value Attribute Required. Value and type of the output tensor. The type is unlimited. Tensor, with the default value Tensor() -
y Output Constant tensor, whose shape and data type are consistent with those of the value attribute. TensorType::ALL() ND

Constraint Description

None

Invocation Description

The Constant operator is a basic operator of the graph engine. It is usually used as a constant node in a graph and is not invoked separately.

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