Pad - 1 vs 2

Files changed (1) hide show
  1. Pad1 → Pad2 +12 -11
Pad1 → Pad2 RENAMED
@@ -1 +1 @@
1
- Given data tensor, paddings, mode, and value.
1
+ Given data tensor, pads, mode, and value.
2
2
  Example:
3
- Insert 0 paddings to the beginning of the second dimension.
3
+ Insert 0 pads 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
- paddings = [0, 0, 2, 0]
9
+ pads = [0, 2, 0, 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
- * **paddings** (required):
20
+ * **pads** (required):
21
- List of integers indicate the padding element count at the beginning
21
+ List of integers indicating the number of padding elements to add or
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
22
+ remove (if negative) at the beginning and end of each axis. For 2D
26
- xi_end, the number of pixels added at the end of axis i.
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.
27
28
  * **value**:
28
- One float, indicates the value to be filled, default is 0
29
+ One float, indicates the value to be filled.
29
30
  **Inputs**
30
31
  * **data** (heterogeneous) - **T**:
31
32
  Input tensor.
32
33
  **Outputs**
33
34
  * **output** (heterogeneous) - **T**:
34
35
  Tensor after padding.
35
36
  **Type Constraints**
36
37
  * **T** in (
37
38
  tensor(double),
38
39
  tensor(float),
39
40
  tensor(float16)
40
41
  ):
41
42
  Constrain input and output types to float tensors.