Upsample¶
Upsample - 10¶
版本¶
域:
main
起始版本:
10
函数:
False
支持级别:
SupportType.COMMON
形状推断:
True
此版本的算子已 自版本 10 起弃用。
摘要¶
对输入张量进行上采样。输出张量的每个维度值计算方式为:输出维度 = floor(输入维度 * 比例)。
属性¶
模式 - STRING (默认为
'nearest'
)两种插值模式:最近邻插值(默认)和线性插值(包括双线性、三线性等)
输入¶
X (异构) - T
N维张量
scales (异构) - tensor(float)
沿着每个维度的比例数组。其取值应大于等于1。'scales' 中的元素数量应与输入 'X' 的秩相同。
输出¶
Y (异构) - T
调整大小后的N维张量
类型约束¶
T 在 (
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 起可用。
摘要¶
对输入张量进行上采样。输出张量的每个维度值计算方式为:输出维度 = floor(输入维度 * 比例)。
属性¶
模式 - STRING (默认为
'nearest'
)两种插值模式:最近邻插值(默认)和线性插值(包括双线性、三线性等)
输入¶
X (异构) - T
N维张量
scales (异构) - tensor(float)
沿着每个维度的比例数组。其取值应大于等于1。'scales' 中的元素数量应与输入 'X' 的秩相同。
输出¶
Y (异构) - T
调整大小后的N维张量
类型约束¶
T 在 (
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 起可用。
摘要¶
对输入张量进行上采样。输出张量的每个维度值计算方式为:输出维度 = floor(输入维度 * 比例)。
属性¶
模式 - STRING (默认为
'nearest'
)两种插值模式:最近邻插值(默认)和线性插值(包括双线性、三线性等)
scales - FLOATS (必需)
沿着每个维度的比例数组。其取值应大于等于1。'scales' 中的元素数量应与输入 'X' 的秩相同。
输入¶
X (异构) - T
N维张量
输出¶
Y (异构) - T
调整大小后的N维张量
类型约束¶
T 在 (
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
支持级别:
SupportType.EXPERIMENTAL
形状推断:
False
实验性算子不维护版本控制。
摘要¶
对输入张量进行上采样。输出张量的宽度和高度计算方式为:输出宽度 = floor(输入宽度 * 宽度比例), 输出高度 = floor(输入高度 * 高度比例)。示例:给定 data
张量、宽度比例、高度比例和模式,对输入 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。
模式 - STRING (默认为
'nearest'
)两种插值模式:最近邻插值(默认)、双线性插值
width_scale - FLOAT (必需)
沿着宽度维度的比例。其取值应大于等于1。
输入¶
X (异构) - T
4维张量, [N,C,H,W]
输出¶
Y (异构) - T
调整大小后的4维张量, [N,C,H,W]
类型约束¶
T 在 (
tensor(bool)
,tensor(double)
,tensor(float)
,tensor(float16)
,tensor(int32)
,tensor(int64)
)约束输出类型为 bool, int32, int64, float16, float, double 张量。