Unsqueeze - 11 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.

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