MaxUnpool - 9 vs 11#
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.
- MaxUnpool9 → MaxUnpool11 +1 -2
MaxUnpool9 → MaxUnpool11
RENAMED
@@ -1 +1 @@
|
|
1
1
|
MaxUnpool essentially computes the partial inverse of the MaxPool op.
|
2
2
|
The input information to this op is typically the output information from a MaxPool op. The first
|
3
3
|
input tensor X is the tensor that needs to be unpooled, which is typically the pooled tensor (first output)
|
4
4
|
from MaxPool. The second input tensor, I, contains the indices to the (locally maximal) elements corrsponding
|
5
5
|
to the elements in the first input tensor X. Input tensor I is typically the second output of the MaxPool op.
|
6
6
|
The third (optional) input is a tensor that specifies the output size of the unpooling operation.
|
7
7
|
MaxUnpool is intended to do 'partial' inverse of the MaxPool op. 'Partial' because all the non-maximal
|
8
8
|
values from the original input to MaxPool are set to zero in the output of the MaxUnpool op. Pooling
|
9
9
|
the result of an unpooling operation should give back the original input to the unpooling op.
|
10
10
|
MaxUnpool can produce the same output size for several input sizes, which makes unpooling op ambiguous.
|
11
11
|
The third input argument, output_size, is meant to disambiguate the op and produce output tensor of
|
12
12
|
known/predictable size.
|
13
13
|
In addition to the inputs, MaxUnpool takes three attributes, namely kernel_shape, strides, and pads,
|
14
14
|
which define the exact unpooling op. The attributes typically have the same values as the corrsponding
|
15
15
|
pooling op that the unpooling op is trying to invert.
|
16
16
|
**Attributes**
|
17
17
|
* **kernel_shape** (required):
|
18
18
|
The size of the kernel along each axis.
|
19
19
|
* **pads**:
|
20
20
|
Padding for the beginning and ending along each spatial axis, it can
|
21
21
|
take any value greater than or equal to 0. The value represent the
|
22
22
|
number of pixels added to the beginning and end part of the
|
23
23
|
corresponding axis. pads format should be as follow [x1_begin,
|
24
24
|
x2_begin...x1_end, x2_end,...], where xi_begin the number of pixels
|
25
25
|
added at the beginning of axis i and xi_end, the number of pixels
|
26
26
|
added at the end of axis i. This attribute cannot be used
|
27
27
|
simultaneously with auto_pad attribute. If not present, the padding
|
28
28
|
defaults to 0 along start and end of each spatial axis.
|
29
29
|
* **strides**:
|
30
|
-
Stride along each spatial axis. If not present, the stride defaults
|
31
|
-
|
30
|
+
Stride along each spatial axis.
|
32
31
|
**Inputs**
|
33
32
|
Between 2 and 3 inputs.
|
34
33
|
* **X** (heterogeneous) - **T1**:
|
35
34
|
Input data tensor that has to be unpooled. This tensor is typically
|
36
35
|
the first output of the MaxPool op.Dimensions for image case are (N
|
37
36
|
x C x H x W), where N is the batch size, C is the number of
|
38
37
|
channels, and H and W are the height and the width of the data. For
|
39
38
|
non-image case, the dimensions are in the form of (N x C x D1 x D2
|
40
39
|
... Dn), where N is the batch size. Optionally, if dimension
|
41
40
|
denotation is in effect, the operation expects the input data tensor
|
42
41
|
to arrive with the dimension denotation of [DATA_BATCH,
|
43
42
|
DATA_CHANNEL, DATA_FEATURE, DATA_FEATURE ...].
|
44
43
|
* **I** (heterogeneous) - **T2**:
|
45
44
|
Input data tensor containing the indices corresponding to elements
|
46
45
|
in the first input tensor X.This tensor is typically the second
|
47
46
|
output of the MaxPool op.Dimensions must be the same as input tensor
|
48
47
|
X. The indices are linear, i.e. computed considering the tensor as
|
49
48
|
flattened 1-D tensor, assuming row-major storage. Also, the linear
|
50
49
|
indices should not consider padding. So the values in indices are in
|
51
50
|
the range [0, N x C x D1 x ... x Dn).
|
52
51
|
* **output_shape** (optional, heterogeneous) - **T2**:
|
53
52
|
The shape of the output can be explicitly set which will cause pads
|
54
53
|
values to be auto generated. If 'output_shape' is specified, 'pads'
|
55
54
|
values are ignored.
|
56
55
|
**Outputs**
|
57
56
|
* **output** (heterogeneous) - **T1**:
|
58
57
|
Output data tensor that contains the result of the unpooling.
|
59
58
|
**Type Constraints**
|
60
59
|
* **T1** in (
|
61
60
|
tensor(double),
|
62
61
|
tensor(float),
|
63
62
|
tensor(float16)
|
64
63
|
):
|
65
64
|
Constrain input and output types to float tensors.
|
66
65
|
* **T2** in (
|
67
66
|
tensor(int64)
|
68
67
|
):
|
69
68
|
Constrain index tensor to int64
|