下载
中文
注册

struct Input

说明

描述模型单个输入的数据结构,配置输入shape、dtype、format等信息。

定义

std::vector<int64_t> minShape;
std::vector<int64_t> maxShape;
std::vector<int64_t> shape;
DataType dtype;
TensorFormat format;

成员

成员名称

描述

minShape

ShapeRange模式下输入的最小shape(在ShapeRange模式中使用)。

min_shape和max_shape数组大小需一致,最大不超过8;数组中的值需要不小于0,且max_shape对应索引的值需不小于min_shape对应索引的值。

默认值:无。

maxShape

ShapeRange模式下输入的最大shape(在ShapeRange模式中使用)。

min_shape和max_shape数组大小需一致,最大不超过8;数组中的值需要不小于0,且max_shape对应索引的值需不小于min_shape对应索引的值。

默认值:无。

shape

静态输入的shape(在纯静态和动态分档模式中使用)。

数组大小最大不超过8,数组中的值需要不小于0。

默认值:无。

dtype

输入的数据类型。

默认值:DataType::UNKNOWN。

format

输入的数据排布。

默认值:TensorFormat::UNKNOWN。