Shape - 13 vs 15#
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.
- Shape13 → Shape15 +0 -38
Shape13 → Shape15
RENAMED
@@ -1 +1 @@
|
|
1
1
|
Takes a tensor as input and outputs an 1D int64 tensor containing the shape of the input tensor.
|
2
|
-
Optional attributes start and end can be used to compute a slice of the input tensor's shape.
|
3
|
-
If start axis is omitted, the slice starts from axis 0.
|
4
|
-
The end axis, if specified, is exclusive (and the returned value will not include the size of that axis).
|
5
|
-
If the end axis is omitted, the axes upto the last one will be included.
|
6
|
-
Negative axes indicate counting back from the last axis.
|
7
|
-
Note that axes will be clamped to the range [0, r-1], where r is the
|
8
|
-
rank of the input tensor if they are out-of-range (after adding r in the case of
|
9
|
-
negative axis). Thus, specifying any end value > r is equivalent to specifying an end
|
10
|
-
value of r, and specifying any start value < -r is equivalent to specifying a start
|
11
|
-
value of 0.
|
12
|
-
|
13
|
-
For example:
|
14
|
-
Input tensor with shape: [2, 3, 4]
|
15
|
-
No attributes specified.
|
16
|
-
Output: [2, 3, 4]
|
17
|
-
|
18
|
-
Input tensor with shape: [2, 3, 4]
|
19
|
-
start: -1
|
20
|
-
Output: [4]
|
21
|
-
|
22
|
-
Input tensor with shape: [2, 3, 4]
|
23
|
-
end: -1
|
24
|
-
Output: [2, 3]
|
25
|
-
|
26
|
-
Input tensor with shape: [2, 3, 4]
|
27
|
-
start: 1
|
28
|
-
end: 2
|
29
|
-
Output: [3]
|
30
|
-
|
31
|
-
**Attributes**
|
32
|
-
|
33
|
-
* **end**:
|
34
|
-
(Optional) Ending axis for slicing the shape. Negative value means
|
35
|
-
counting dimensions from the back. If omitted, sizes of all axes
|
36
|
-
upto (including) the last one will be included.
|
37
|
-
* **start**:
|
38
|
-
(Optional) Starting axis for slicing the shape. Default value is
|
39
|
-
0.Negative value means counting dimensions from the back.
|
40
2
|
**Inputs**
|
41
3
|
* **data** (heterogeneous) - **T**:
|
42
4
|
An input tensor.
|
43
5
|
**Outputs**
|
44
6
|
* **shape** (heterogeneous) - **T1**:
|
45
7
|
Shape of the input tensor
|
46
8
|
**Type Constraints**
|
47
9
|
* **T** in (
|
48
10
|
tensor(bfloat16),
|
49
11
|
tensor(bool),
|
50
12
|
tensor(complex128),
|
51
13
|
tensor(complex64),
|
52
14
|
tensor(double),
|
53
15
|
tensor(float),
|
54
16
|
tensor(float16),
|
55
17
|
tensor(int16),
|
56
18
|
tensor(int32),
|
57
19
|
tensor(int64),
|
58
20
|
tensor(int8),
|
59
21
|
tensor(string),
|
60
22
|
tensor(uint16),
|
61
23
|
tensor(uint32),
|
62
24
|
tensor(uint64),
|
63
25
|
tensor(uint8)
|
64
26
|
):
|
65
27
|
Input tensor can be of arbitrary type.
|
66
28
|
* **T1** in (
|
67
29
|
tensor(int64)
|
68
30
|
):
|
69
31
|
Constrain output to int64 tensor.
|