| Files | Last commit | Last update |
|---|---|---|
| 1 month ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 1 month ago | ||
| 26 days ago | ||
| 13 days ago |
ReadVariableOp
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
Reads and returns the value of the input variable tensor. The shape and data type of the output tensor y are consistent with those of the input tensor x.
Parameter Description
| Parameter Name | Input/Output/Attribute | Description | Data Type | Data Format |
|---|---|---|---|---|
| x | Input | Variable tensor of a numeric type. | TensorType({DT_FLOAT, DT_FLOAT16, DT_INT8, DT_INT16, DT_UINT16, DT_UINT8, DT_INT32, DT_INT64, DT_UINT32, DT_UINT64, DT_BOOL, DT_DOUBLE}) | ND |
| dtype | Attribute | Output data type, which is consistent with the input data type. | Int, with the default value DT_INT32 | - |
| y | Output | Tensor of a numeric type, whose shape and data type are consistent with those of the input x. | TensorType({DT_FLOAT, DT_FLOAT16, DT_INT8, DT_INT16, DT_UINT16, DT_UINT8, DT_INT32, DT_INT64, DT_UINT32, DT_UINT64, DT_BOOL, DT_DOUBLE}) | ND |
Constraint Description
None
Invocation Description
The ReadVariableOp operator is a basic operator of the graph engine. It is usually used to read the value of a variable tensor. It is compatible with the TensorFlow operator ReadVariableOp.
| Invocation Method | Invocation Sample | Description |
|---|---|---|
| Graph-mode invocation | test_geir_read_variable_op | Invokes the ReadVariableOp operator by building a graph through the operator IR |