GetOutputDataType
Function Usage
Obtains the output data type based on the operator output index. The output index refers to the actual index after operator instantiation, not the index in the prototype definition.
Prototype
1 | ge::DataType GetOutputDataType(const size_t index) const |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
index |
Input |
Operator output index, starting from 0. |
Returns
Data type of a specified output. If the index is invalid, DT_UNDEFINED is returned.
Constraints
None
Examples
1 2 3 4 | ge::graphStatus InferDataTypeForXXX(InferDataTypeContext *context) { auto data_type = context->GetOutputDataType(0); ... } |
Parent topic: InferDataTypeContext