Flatten - 1 vs 13#
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.
- Flatten1 → Flatten13 +6 -19
Flatten1 → Flatten13
RENAMED
@@ -1 +1 @@
|
|
1
1
|
Flattens the input tensor into a 2D matrix. If input tensor has shape
|
2
2
|
(d_0, d_1, ... d_n) then the output will have shape
|
3
3
|
(d_0 X d_1 ... d_(axis-1), d_axis X d_(axis+1) ... X dn).
|
4
4
|
**Attributes**
|
5
5
|
* **axis**:
|
6
6
|
Indicate up to which input dimensions (exclusive) should be
|
7
7
|
flattened to the outer dimension of the output. The value for axis
|
8
|
-
must be in the range [
|
8
|
+
must be in the range [0, R], where R is the rank of the input
|
9
|
-
tensor. Negative value means counting dimensions from the back. When
|
10
|
-
axis = 0, the shape of the output tensor is (1, (d_0 X
|
9
|
+
tensor. When axis = 0, the shape of the output tensor is (1, (d_0 X
|
11
|
-
where the shape of the input tensor is (d_0, d_1, ...
|
10
|
+
d_1 ... d_n), where the shape of the input tensor is (d_0, d_1, ...
|
11
|
+
d_n).
|
12
12
|
**Inputs**
|
13
13
|
* **input** (heterogeneous) - **T**:
|
14
14
|
A tensor of rank >= axis.
|
15
15
|
**Outputs**
|
16
16
|
* **output** (heterogeneous) - **T**:
|
17
17
|
A 2D tensor with the contents of the input tensor, with input
|
18
18
|
dimensions up to axis flattened to the outer dimension of the output
|
19
19
|
and remaining input dimensions flattened into the inner dimension of
|
20
20
|
the output.
|
21
21
|
**Type Constraints**
|
22
22
|
* **T** in (
|
23
|
-
tensor(bfloat16),
|
24
|
-
tensor(bool),
|
25
|
-
tensor(complex128),
|
26
|
-
tensor(complex64),
|
27
23
|
tensor(double),
|
28
24
|
tensor(float),
|
29
|
-
tensor(float16)
|
25
|
+
tensor(float16)
|
30
|
-
tensor(int16),
|
31
|
-
tensor(int32),
|
32
|
-
tensor(int64),
|
33
|
-
tensor(int8),
|
34
|
-
tensor(string),
|
35
|
-
tensor(uint16),
|
36
|
-
tensor(uint32),
|
37
|
-
tensor(uint64),
|
38
|
-
tensor(uint8)
|
39
26
|
):
|
40
|
-
Constrain input and output to
|
27
|
+
Constrain input and output types to float tensors.? ++++++ +++ ^
|