GetInputDesc
产品支持情况
头文件和库文件
- 头文件:#include <graph/operator.h>
- 库文件:libgraph.so
功能说明
根据算子Input名称或Input索引获取算子Input的TensorDesc。
函数原型
说明
数据类型为string的接口后续版本会废弃,建议使用数据类型为非string的接口。
TensorDesc GetInputDesc(const std::string &name) const
TensorDesc GetInputDescByName(const char_t *name) const
TensorDesc GetInputDesc(uint32_t index) const
参数说明
|
当无此算子Input名称时,则返回TensorDesc默认构造的对象,其中,主要设置DataType为DT_FLOAT(表示float类型),Format为FORMAT_NCHW(表示NCHW)。 |
||
|
当无此算子Input索引时,则返回TensorDesc默认构造的对象,其中,主要设置DataType为DT_FLOAT(表示float类型),Format为FORMAT_NCHW(表示NCHW)。 |
返回值说明
算子Input的TensorDesc。
异常处理
无。
约束说明
无。