Overview
InferDataTypeContext is inherited from ExtendedKernelContext. It is a context class used for inferring data types. It provides APIs for obtaining the input and output data types during operator data type inference and supports setting the output data type.
The following figure shows the inheritance relationship of InferDataTypeContext.
Header Files to Be Included
1 | #include <infer_datatype_context.h> |
Public Member Functions
ge::DataType GetInputDataType(const size_t index) const ge::DataType GetOptionalInputDataType(const size_t ir_index) const ge::DataType GetDynamicInputDataType(const size_t ir_index, const size_t relative_index) const ge::DataType GetRequiredInputDataType(const size_t ir_index) const ge::DataType GetOutputDataType(const size_t index) const ge::graphStatus SetOutputDataType(const size_t index, const ge::DataType datatype)
Parent topic: InferDataTypeContext