更新时间:2021-03-18 GMT+08:00
分享

GetOutputDesc

函数原型

TensorDesc GetOutputDesc(const string& name) const;

TensorDesc GetOutputDesc(uint32_t index) const;

功能说明

根据算子Output名称或Output索引获取Output的TensorDesc。

参数说明

参数名

输入/输出

类型

描述

name

输入

const string&

算子Output名称。

index

输入

uint32_t

算子Output索引。

无算子Output索引,则返回TensorDesc默认构造的对象,其中,主要设置DataType为DT_FLOAT(表示float类型),Format为FORMAT_NCHW(表示NCHW)。

返回值

参数名

类型

描述(参数说明、取值范围等)

-

TensorDesc

获取TensorDesc成功,返回对应TensorDesc, 否则,返回TensorDesc默认构造的对象,其中,主要设置DataType为DT_FLOAT(表示float类型),Format为FORMAT_NCHW(表示NCHW)。

异常处理

无。

约束说明

无。

相关文档