Reshape - 13 vs 14

Files changed (1) hide show
  1. Reshape13 → Reshape14 +12 -1
Reshape13 → Reshape14 RENAMED
@@ -1 +1 @@
1
1
  Reshape the input tensor similar to numpy.reshape.
2
2
  First input is the data tensor, second input is a shape tensor which specifies the output shape. It outputs the reshaped tensor.
3
3
  At most one dimension of the new shape can be -1. In this case, the value is
4
4
  inferred from the size of the tensor and the remaining dimensions. A dimension
5
5
  could also be 0, in which case the actual dimension value is unchanged (i.e. taken
6
+ from the input tensor). If 'allowzero' is set, and the new shape includes 0, the
7
+ dimension will be set explicitly to zero (i.e. not taken from input tensor).
6
- from the input tensor). Shape (second input) could be an empty shape, which means converting to a scalar.
8
+ Shape (second input) could be an empty shape, which means converting to a scalar.
7
9
  The input tensor's shape and the output tensor's shape are required to have the same number of elements.
10
+
11
+ **Attributes**
12
+
13
+ * **allowzero**:
14
+ (Optional) By default, when any value in the 'shape' input is equal
15
+ to zero the corresponding dimension value is copied from the input
16
+ tensor dynamically. allowzero=1 indicates that if any value in the
17
+ 'shape' input is set to zero, the zero value is honored, similar to
18
+ NumPy.
8
19
  **Inputs**
9
20
  * **data** (heterogeneous) - **T**:
10
21
  An input tensor.
11
22
  * **shape** (heterogeneous) - **tensor(int64)**:
12
23
  Specified shape for output.
13
24
  **Outputs**
14
25
  * **reshaped** (heterogeneous) - **T**:
15
26
  Reshaped data.
16
27
  **Type Constraints**
17
28
  * **T** in (
18
29
  tensor(bfloat16),
19
30
  tensor(bool),
20
31
  tensor(complex128),
21
32
  tensor(complex64),
22
33
  tensor(double),
23
34
  tensor(float),
24
35
  tensor(float16),
25
36
  tensor(int16),
26
37
  tensor(int32),
27
38
  tensor(int64),
28
39
  tensor(int8),
29
40
  tensor(string),
30
41
  tensor(uint16),
31
42
  tensor(uint32),
32
43
  tensor(uint64),
33
44
  tensor(uint8)
34
45
  ):
35
46
  Constrain input and output types to all tensor types.