SetOutputDataType
Function Usage
Sets the specified output data type based on the output index.
Prototype
1 | 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 description of DataType, see DataType. |
Returns
Set result status. For details about the status, see ge::graphStatus.
If the index is invalid, a failure message is returned.
Constraints
None
Examples
1 2 3 4 | ge::graphStatus InferDataTypeForXXX(InferDataTypeContext *context) { auto ret = context->SetOutputDataType(0, ge::DataType::DT_FLOAT); ... } |
Parent topic: InferDataTypeContext