Upsample¶
Upsample - 10¶
版本¶
域:
main
since_version:
10
函数:
False
支持级别:
SupportType.COMMON
形状推断:
True
此版本的算子自 10 版本起已被弃用。
摘要¶
对输入张量进行上采样。输出张量的每个维度值计算公式为:output_dimension = floor(input_dimension * scale)。
属性¶
mode - STRING (默认值为
'nearest'
)两种插值模式:nearest(默认)和 linear(包括 bilinear、trilinear 等)。
输入¶
X (异构) - T
N 维张量
scales (异构) - tensor(float)
每个维度上的缩放因子数组。其值大于或等于 1。‘scales’ 的元素数量应与输入 ‘X’ 的秩相同。
输出¶
Y (异构) - T
重塑后的 N 维张量
类型约束¶
T in (
tensor(bool)
,tensor(complex128)
,tensor(complex64)
,tensor(double)
,tensor(float)
,tensor(float16)
,tensor(int16)
,tensor(int32)
,tensor(int64)
,tensor(int8)
,tensor(string)
,tensor(uint16)
,tensor(uint32)
,tensor(uint64)
,tensor(uint8)
)将输入 ‘X’ 和输出 ‘Y’ 限制为所有张量类型。
Upsample - 9¶
版本¶
域:
main
起始版本:
9
函数:
False
支持级别:
SupportType.COMMON
形状推断:
True
此版本的运算符自 版本 9 起可用。
摘要¶
对输入张量进行上采样。输出张量的每个维度值计算公式为:output_dimension = floor(input_dimension * scale)。
属性¶
mode - STRING (默认值为
'nearest'
)两种插值模式:nearest(默认)和 linear(包括 bilinear、trilinear 等)。
输入¶
X (异构) - T
N 维张量
scales (异构) - tensor(float)
每个维度上的缩放因子数组。其值大于或等于 1。‘scales’ 的元素数量应与输入 ‘X’ 的秩相同。
输出¶
Y (异构) - T
重塑后的 N 维张量
类型约束¶
T in (
tensor(bool)
,tensor(complex128)
,tensor(complex64)
,tensor(double)
,tensor(float)
,tensor(float16)
,tensor(int16)
,tensor(int32)
,tensor(int64)
,tensor(int8)
,tensor(string)
,tensor(uint16)
,tensor(uint32)
,tensor(uint64)
,tensor(uint8)
)将输入 ‘X’ 和输出 ‘Y’ 限制为所有张量类型。
Upsample - 7¶
版本¶
域:
main
起始版本:
7
函数:
False
支持级别:
SupportType.COMMON
形状推断:
True
此版本的操作符自版本 7 起可用。
摘要¶
对输入张量进行上采样。输出张量的每个维度值计算公式为:output_dimension = floor(input_dimension * scale)。
属性¶
mode - STRING (默认值为
'nearest'
)两种插值模式:nearest(默认)和 linear(包括 bilinear、trilinear 等)。
scales - FLOATS (必需)
每个维度上的缩放因子数组。其值大于或等于 1。‘scales’ 的元素数量应与输入 ‘X’ 的秩相同。
输入¶
X (异构) - T
N 维张量
输出¶
Y (异构) - T
重塑后的 N 维张量
类型约束¶
T in (
tensor(bool)
,tensor(complex128)
,tensor(complex64)
,tensor(double)
,tensor(float)
,tensor(float16)
,tensor(int16)
,tensor(int32)
,tensor(int64)
,tensor(int8)
,tensor(string)
,tensor(uint16)
,tensor(uint32)
,tensor(uint64)
,tensor(uint8)
)将输入和输出类型限制为所有张量类型。
Upsample - 1¶
版本¶
域:
main
起始版本:
1
函数:
False
support_level:
SupportType.EXPERIMENTAL
形状推断:
False
不对实验性算子维护版本。
摘要¶
对输入张量进行上采样。输出张量的宽度和高度为:output_width = floor(input_width * width_scale), output_height = floor(input_height * height_scale)。示例:给定 data
张量,width_scale,height_scale,mode,在 nearest 模式下对 4 维输入张量进行上采样:data = [[[ [1, 2], [3, 4] ]]] width_scale = 2 height_scale = 2 mode = “nearest” output = [[[ [1, 1, 2, 2], [1, 1, 2, 2], [3, 3, 4, 4], [3, 3, 4, 4] ]]]
属性¶
height_scale - FLOAT (必需)
高度维度上的缩放因子。其值大于或等于 1。
mode - STRING (默认值为
'nearest'
)两种插值模式:nearest(默认)、bilinear。
width_scale - FLOAT (必需)
宽度维度上的缩放因子。其值大于或等于 1。
输入¶
X (异构) - T
4 维张量,[N,C,H,W]
输出¶
Y (异构) - T
重塑后的 4 维张量,[N,C,H,W]
类型约束¶
T in (
tensor(bool)
,tensor(double)
,tensor(float)
,tensor(float16)
,tensor(int32)
,tensor(int64)
)将输出类型限制为 bool、int32、int64、float16、float、double 张量。