Upsample - 1 vs 9#
Next section compares an older to a newer version of the same operator after both definition are converted into markdown text. Green means an addition to the newer version, red means a deletion. Anything else is unchanged.
- Upsample1 → Upsample9 +30 -21
Upsample1 → Upsample9
RENAMED
@@ -1 +1 @@
|
|
1
1
|
Upsample the input tensor.
|
2
|
-
|
2
|
+
The width and height of the output tensor are:
|
3
|
-
|
3
|
+
output_width = floor(input_width * width_scale),
|
4
|
+
output_height = floor(input_height * height_scale).
|
5
|
+
Example:
|
6
|
+
Given data tensor, width_scale, height_scale, mode,
|
7
|
+
Upsample the input 4-D tensor in nearest mode:
|
8
|
+
data = [[[
|
9
|
+
[1, 2],
|
10
|
+
[3, 4]
|
11
|
+
]]]
|
12
|
+
width_scale = 2
|
13
|
+
height_scale = 2
|
14
|
+
mode = "nearest"
|
15
|
+
output = [[[
|
16
|
+
[1, 1, 2, 2],
|
17
|
+
[1, 1, 2, 2],
|
18
|
+
[3, 3, 4, 4],
|
19
|
+
[3, 3, 4, 4]
|
20
|
+
]]]
|
4
21
|
**Attributes**
|
22
|
+
* **height_scale** (required):
|
23
|
+
The scale along height dimension. It takes value greater than or
|
24
|
+
equal to 1.
|
5
25
|
* **mode**:
|
6
|
-
Two interpolation modes: nearest
|
26
|
+
Two interpolation modes: nearest(default), bilinear
|
7
|
-
|
27
|
+
* **width_scale** (required):
|
28
|
+
The scale along width dimension. It takes value greater than or
|
29
|
+
equal to 1.
|
8
30
|
**Inputs**
|
9
31
|
* **X** (heterogeneous) - **T**:
|
32
|
+
4-D tensor, [N,C,H,W]
|
10
|
-
N-D tensor
|
11
|
-
* **scales** (heterogeneous) - **tensor(float)**:
|
12
|
-
The scale array along each dimension. It takes value greater than or
|
13
|
-
equal to 1. The number of elements of 'scales' should be the same as
|
14
|
-
the rank of input 'X'.
|
15
33
|
**Outputs**
|
16
34
|
* **Y** (heterogeneous) - **T**:
|
17
|
-
|
35
|
+
4-D tensor after resizing, [N,C,H,W]
|
18
36
|
**Type Constraints**
|
19
37
|
* **T** in (
|
20
38
|
tensor(bool),
|
21
|
-
tensor(complex128),
|
22
|
-
tensor(complex64),
|
23
39
|
tensor(double),
|
24
40
|
tensor(float),
|
25
41
|
tensor(float16),
|
26
|
-
tensor(int16),
|
27
42
|
tensor(int32),
|
28
|
-
tensor(int64)
|
43
|
+
tensor(int64)
|
29
|
-
tensor(int8),
|
30
|
-
tensor(string),
|
31
|
-
tensor(uint16),
|
32
|
-
tensor(uint32),
|
33
|
-
tensor(uint64),
|
34
|
-
tensor(uint8)
|
35
44
|
):
|
36
|
-
|
45
|
+
tensors.
|