GetInputDesc
函数原型
TensorDesc GetInputDesc(const string& name) const;
TensorDesc GetInputDesc(uint32_t index) const;
功能说明
根据算子Input名称或Input索引获取Input的TensorDesc。
参数说明
参数名 |
输入/输出 |
类型 |
描述 |
---|---|---|---|
name |
输入 |
const string& |
算子Input名称。 无算子Input名称,则返回TensorDesc默认构造的对象,其中,主要设置DataType为DT_FLOAT(表示float类型),Format为FORMAT_NCHW(表示NCHW)。 |
index |
输入 |
uint32_t |
算子Input索引。 无算子Input索引,则返回TensorDesc默认构造的对象,其中,主要设置DataType为DT_FLOAT(表示float类型),Format为FORMAT_NCHW(表示NCHW)。 |
返回值
参数名 |
类型 |
描述(参数说明、取值范围等) |
---|---|---|
TensorDesc |
TensorDesc |
算子Input的TensorDesc。 |
异常处理
无。
约束说明
无。