GetOutputDataType

函数功能

根据输出索引,获取指定输出的数据类型。

函数原型

ge::DataType GetOutputDataType(size_t index) const;

参数说明

参数

输入/输出

说明

index

输入

算子IR原型定义中的输出索引,从0开始计数。

返回值说明

返回指定输出的数据类型,index非法时,返回DT_UNDEFINED。

约束说明

调用示例

ge::graphStatus InferDataTypeForXXX(InferShapeContext *context) {
  auto data_type = context->GetOutputDataType(0);
  ...
}