Shape - 13 vs 23

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. Shape13 → Shape23 +48 -1
Shape13 → Shape23 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
+ Examples:
14
+
15
+
16
+ Input tensor with shape: [2, 3, 4]
17
+ No attributes specified.
18
+ Output: [2, 3, 4]
19
+
20
+
21
+
22
+ Input tensor with shape: [2, 3, 4]
23
+ start: -1
24
+ Output: [4]
25
+
26
+
27
+
28
+ Input tensor with shape: [2, 3, 4]
29
+ end: -1
30
+ Output: [2, 3]
31
+
32
+
33
+
34
+ Input tensor with shape: [2, 3, 4]
35
+ start: 1
36
+ end: 2
37
+ Output: [3]
38
+
39
+
40
+ ### Attributes
41
+
42
+ * **end - INT** :
43
+
44
+ (Optional) Ending axis for slicing the shape. Negative value means counting dimensions from the back. If omitted, sizes of all axes upto (including) the last one will be included.
45
+
46
+ * **start - INT** (default is '0'):
47
+
48
+ (Optional) Starting axis for slicing the shape. Default value is 0.Negative value means counting dimensions from the back.
2
49
  ### Inputs
3
50
  - **data** (heterogeneous) - **T**:
4
51
  An input tensor.
5
52
  ### Outputs
6
53
  - **shape** (heterogeneous) - **T1**:
7
54
  Shape of the input tensor
8
55
  ### Type Constraints
9
- * **T** in ( tensor(bfloat16), tensor(bool), tensor(complex128), tensor(complex64), tensor(double), tensor(float), tensor(float16), tensor(int16), tensor(int32), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint64), tensor(uint8) ):
56
+ * **T** in ( tensor(bfloat16), tensor(bool), tensor(complex128), tensor(complex64), tensor(double), tensor(float), tensor(float16), tensor(float4e2m1), tensor(float8e4m3fn), tensor(float8e4m3fnuz), tensor(float8e5m2), tensor(float8e5m2fnuz), tensor(int16), tensor(int32), tensor(int4), tensor(int64), tensor(int8), tensor(string), tensor(uint16), tensor(uint32), tensor(uint4), tensor(uint64), tensor(uint8) ):
10
57
  Input tensor can be of arbitrary type.
11
58
  * **T1** in ( tensor(int64) ):
12
59
  Constrain output to int64 tensor.