Upsample¶
Upsample - 10¶
版本¶
網域:
main
since_version:
10
函式:
False
支援層級:
SupportType.COMMON
形狀推斷:
True
此版本的運算子已自版本 10 起棄用。
摘要¶
對輸入張量進行升採樣。輸出張量的每個維度值為:output_dimension = floor(input_dimension * scale)。
屬性¶
mode - STRING(預設值為
'nearest'
)兩種插值模式:nearest(預設值)和 linear(包括雙線性、三線性等)
輸入¶
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
since_version:
9
函式:
False
支援層級:
SupportType.COMMON
形狀推斷:
True
此版本的運算子已自版本 9 起可用。
摘要¶
對輸入張量進行升採樣。輸出張量的每個維度值為:output_dimension = floor(input_dimension * scale)。
屬性¶
mode - STRING(預設值為
'nearest'
)兩種插值模式:nearest(預設值)和 linear(包括雙線性、三線性等)
輸入¶
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
since_version:
7
函式:
False
支援層級:
SupportType.COMMON
形狀推斷:
True
此版本的運算子已自版本 7 起可用。
摘要¶
對輸入張量進行升採樣。輸出張量的每個維度值為:output_dimension = floor(input_dimension * scale)。
屬性¶
mode - STRING(預設值為
'nearest'
)兩種插值模式:nearest(預設值)和 linear(包括雙線性、三線性等)
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
since_version:
1
函式:
False
支援層級:
SupportType.EXPERIMENTAL
形狀推斷:
False
實驗性運算沒有維護版本控制。
摘要¶
對輸入張量進行升採樣。輸出張量的寬度和高度為:output_width = floor(input_width * width_scale),output_height = floor(input_height * height_scale)。範例:給定 data
張量、width_scale、height_scale、mode,在最鄰近模式中對輸入 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 在 (
tensor(bool)
,tensor(double)
,tensor(float)
,tensor(float16)
,tensor(int32)
,tensor(int64)
) 中將輸出類型限制為 bool、int32、int64、float16、float、double 張量。