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

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