Shape - 13 vs 15¶
- Shape13 → Shape15 +38 -0
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.
|
2
40
|
**Inputs**
|
3
41
|
* **data** (heterogeneous) - **T**:
|
4
42
|
An input tensor.
|
5
43
|
**Outputs**
|
6
44
|
* **shape** (heterogeneous) - **T1**:
|
7
45
|
Shape of the input tensor
|
8
46
|
**Type Constraints**
|
9
47
|
* **T** in (
|
10
48
|
tensor(bfloat16),
|
11
49
|
tensor(bool),
|
12
50
|
tensor(complex128),
|
13
51
|
tensor(complex64),
|
14
52
|
tensor(double),
|
15
53
|
tensor(float),
|
16
54
|
tensor(float16),
|
17
55
|
tensor(int16),
|
18
56
|
tensor(int32),
|
19
57
|
tensor(int64),
|
20
58
|
tensor(int8),
|
21
59
|
tensor(string),
|
22
60
|
tensor(uint16),
|
23
61
|
tensor(uint32),
|
24
62
|
tensor(uint64),
|
25
63
|
tensor(uint8)
|
26
64
|
):
|
27
65
|
Input tensor can be of arbitrary type.
|
28
66
|
* **T1** in (
|
29
67
|
tensor(int64)
|
30
68
|
):
|
31
69
|
Constrain output to int64 tensor.
|