GetOptionalInputShape
函数功能
根据算子原型定义中的输入索引获取对应的可选输入Shape指针。
函数原型
1 | const Shape *GetOptionalInputShape(const size_t ir_index) const |
参数说明
参数 |
输入/输出 |
说明 |
---|---|---|
ir_index |
输入 |
算子IR原型定义中的输入索引,从0开始计数。 |
约束说明
无。
调用示例
1 2 3 4 5 | ge::graphStatus InferFormatForXXX(InferFormatContext *context) { const auto shape= context->GetOptionalInputShape(0); // 获取第0个输入的shape GE_ASSERT_NOTNULL(shape); // ... } |
父主题: InferFormatContext