Unsqueeze - 1 vs 11¶
- Unsqueeze1 → Unsqueeze11 +14 -7
Unsqueeze1 → Unsqueeze11
RENAMED
@@ -1 +1 @@
|
|
1
|
-
Insert single-dimensional entries to the shape of
|
1
|
+
Insert single-dimensional entries to the shape of an input tensor (data).
|
2
|
-
Takes one required argument axes
|
2
|
+
Takes one required argument axes - which contains a list of dimension indices and this operator will insert a dimension of value 1 into the corresponding index of the output tensor (expanded).
|
3
|
+
|
3
|
-
|
4
|
+
For example:
|
4
|
-
Given
|
5
|
+
Given an input tensor (data) of shape [3, 4, 5], then
|
5
|
-
Unsqueeze(
|
6
|
+
Unsqueeze(data, axes=[0, 4]) outputs a tensor (expanded) containing same data as data but with shape [1, 3, 4, 5, 1].
|
7
|
+
|
8
|
+
The attribute axes should not contain any duplicate entries. It is an error if it contains duplicates.
|
9
|
+
The rank of the output tensor (output_rank) is the rank of the input tensor (data) plus the number of values in axes.
|
10
|
+
Each value in axes should be within the (inclusive) range [-output_rank , output_rank - 1].
|
11
|
+
The order of values in axes does not matter and can come in any order.
|
6
12
|
**Attributes**
|
7
13
|
* **axes** (required):
|
8
|
-
List of
|
14
|
+
List of integers indicating the dimensions to be inserted. Negative
|
15
|
+
value means counting dimensions from the back. Accepted range is
|
9
|
-
|
16
|
+
[-r, r-1] where r = rank(expanded).
|
10
17
|
**Inputs**
|
11
18
|
* **data** (heterogeneous) - **T**:
|
12
19
|
Original tensor
|
13
20
|
**Outputs**
|
14
21
|
* **expanded** (heterogeneous) - **T**:
|
15
22
|
Reshaped tensor with same data as input.
|
16
23
|
**Type Constraints**
|
17
24
|
* **T** in (
|
18
25
|
tensor(bool),
|
19
26
|
tensor(complex128),
|
20
27
|
tensor(complex64),
|
21
28
|
tensor(double),
|
22
29
|
tensor(float),
|
23
30
|
tensor(float16),
|
24
31
|
tensor(int16),
|
25
32
|
tensor(int32),
|
26
33
|
tensor(int64),
|
27
34
|
tensor(int8),
|
28
35
|
tensor(string),
|
29
36
|
tensor(uint16),
|
30
37
|
tensor(uint32),
|
31
38
|
tensor(uint64),
|
32
39
|
tensor(uint8)
|
33
40
|
):
|
34
41
|
Constrain input and output types to all tensor types.
|