目录

SetOutputDataType

Function Description

Sets the specified output data type based on the output index.

Function Prototype

ge::graphStatus SetOutputDataType(const size_t index, const ge::DataType datatype);

Parameters

Parameter Input/Output Description
index Input Output index in the operator IR prototype definition, starting from 0.
datatype Input

Output data type to be set.

For details about the data type, see DataType.

Return Value

Returns the result status. For details about the status, see ge::graphStatus.

If index is invalid, a failure message is returned.

Restrictions

None

Calling Example

ge::graphStatus InferDataTypeForXXX(InferDataTypeContext *context) {
  auto ret = context->SetOutputDataType(0, ge::DataType::DT_FLOAT);
  // ...
}