Updated on 2022-03-13 GMT+08:00

OUTPUT

Function Prototype

OUTPUT (x, t)

Function Description

Registers the output information of an operator.

After the operator output information is successfully registered, APIs (for obtaining the operator output name and setting the operator output description) are generated automatically.

For example, if the operator output is y and the data type supported by the operator input is TensorType{DT_FLOAT}, call the OUTPUT(y, TensorType{DT_FLOAT}) API. After the operator output is successfully registered, the following APIs are automatically generated:

static const string name_out_y();// Returns the output name, that is, y.
TensorDesc get_output_desc_y();// Returns the description of output y.
graphStatus update_output_desc_y(const TensorDesc& tensorDesc););// Sets the description of output y, including Shape, DataType, and Format.

Parameter Description

Parameter

Input/Output

Type

Description

x

Input

-

Macro parameter, output name of the operator

t

Input

-

Data type supported by the operator output. One or more data types defined by TensorType are supported. Separate data types with commas (,). For example:

TensorType{DT_FLOAT}

TensorType({DT_FLOAT, DT_INT8}

Return Value

None

Exception Handling

None

Restriction

For an operator, the registered output name must be unique.