Pad - 1 vs 2#

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.

Files changed (1) hide show
  1. Pad1 → Pad2 +11 -12
Pad1 → Pad2 RENAMED
@@ -1 +1 @@
1
- Given data tensor, pads, mode, and value.
1
+ Given data tensor, paddings, mode, and value.
2
2
  Example:
3
- Insert 0 pads to the beginning of the second dimension.
3
+ Insert 0 paddings to the beginning of the second dimension.
4
4
  data = [
5
5
  [1.0, 1.2],
6
6
  [2.3, 3.4],
7
7
  [4.5, 5.7],
8
8
  ]
9
- pads = [0, 2, 0, 0]
9
+ paddings = [0, 0, 2, 0]
10
10
  output = [
11
11
  [
12
12
  [0.0, 0.0, 1.0, 1.2],
13
13
  [0.0, 0.0, 2.3, 3.4],
14
14
  [0.0, 0.0, 4.5, 5.7],
15
15
  ],
16
16
  ]
17
17
  **Attributes**
18
18
  * **mode**:
19
19
  Three modes: constant(default), reflect, edge
20
- * **pads** (required):
20
+ * **paddings** (required):
21
+ List of integers indicate the padding element count at the beginning
22
+ and end of each axis, for 2D it is the number of pixel. paddings
23
+ rank should be double of the input's rank. paddings format should
24
+ be as follow [x1_begin, x2_begin...x1_end, x2_end,...], where
25
+ xi_begin the number of pixels added at the beginning of axis i and
26
+ xi_end, the number of pixels added at the end of axis i.
21
- List of integers indicating the number of padding elements to add or
22
- remove (if negative) at the beginning and end of each axis. For 2D
23
- it is the number of pixels. pads rank should be double of the
24
- input's rank. pads format should be as follow [x1_begin,
25
- x2_begin...x1_end, x2_end,...], where xi_begin the number of pixels
26
- added at the beginning of axis i and xi_end, the number of pixels
27
- added at the end of axis i.
28
27
  * **value**:
29
- One float, indicates the value to be filled.
28
+ One float, indicates the value to be filled, default is 0
30
29
  **Inputs**
31
30
  * **data** (heterogeneous) - **T**:
32
31
  Input tensor.
33
32
  **Outputs**
34
33
  * **output** (heterogeneous) - **T**:
35
34
  Tensor after padding.
36
35
  **Type Constraints**
37
36
  * **T** in (
38
37
  tensor(double),
39
38
  tensor(float),
40
39
  tensor(float16)
41
40
  ):
42
41
  Constrain input and output types to float tensors.