成员变量
成员名称 |
成员类型 |
描述 |
---|---|---|
min_shape |
Tuple[int] or List[int] or torch.Size |
ShapeRange模式下输入的最小shape(在ShapeRange模式中使用);可选。 min_shape和max_shape数组大小需一致,最大不超过8;数组中的值不小于-1,且必须满足以下两种条件中的一种:
默认值:无。 |
max_shape |
Tuple[int] or List[int] or torch.Size |
ShapeRange模式下输入的最大shape(在ShapeRange模式中使用);可选。 min_shape和max_shape数组大小需一致,最大不超过8;数组中的值不小于-1,且必须满足以下两种条件中的一种:
默认值:无。 |
shape |
Tuple[int] or List[int] or torch.Size |
静态输入的shape(在纯静态和动态分档模式中使用,其中动态分档模式仅支持在编译TorchScript模型时使用);可选。 数组大小最大不超过8,数组中的值需要不小于0。 默认值:无。 |
name |
str |
标志输入的名称;可选。 默认值:无。 |
dtype |
torch.dtype or mindietorch.dtype |
输入的数据类型;可选。 具体数据类型请参见enum mindietorch.dtype。 默认值:mindietorch.dtype.FLOAT。 |
format |
torch.memory_format or mindietorch.TensorFormat |
输入的数据排布;可选。 具体数据排布请参见enum mindietorch.TensorFormat。 默认值:mindietorch.TensorFormat.NCHW。 |
shape_mode |
CompileMode(Enum) |
指示输入模式,标识输入是静态输入或者动态输入,具体数据排布请参见class CompileMode(Enum)。 默认值:无。 |