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