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