If - 11 vs 16#

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. If11 → If16 +1 -51
If11 → If16 RENAMED
@@ -1 +1 @@
1
1
  If conditional
2
2
  **Attributes**
3
3
  * **else_branch** (required):
4
4
  Graph to run if condition is false. Has N outputs: values you wish
5
5
  to be live-out to the enclosing scope. The number of outputs must
6
6
  match the number of outputs in the then_branch.
7
7
  * **then_branch** (required):
8
8
  Graph to run if condition is true. Has N outputs: values you wish to
9
9
  be live-out to the enclosing scope. The number of outputs must match
10
10
  the number of outputs in the else_branch.
11
11
  **Inputs**
12
12
  * **cond** (heterogeneous) - **B**:
13
13
  Condition for the if
14
14
  **Outputs**
15
15
  Between 1 and 2147483647 outputs.
16
16
  * **outputs** (variadic) - **V**:
17
17
  Values that are live-out to the enclosing scope. The return values
18
18
  in the then_branch and else_branch must be of the same data
19
19
  type. The then_branch and else_branch may produce tensors with
20
20
  the same element type and different shapes. If corresponding outputs
21
21
  from the then-branch and the else-branch have static shapes S1 and
22
22
  S2, then the shape of the corresponding output variable of the if-
23
23
  node (if present) must be compatible with both S1 and S2 as it
24
24
  represents the union of both possible shapes.For example, if in a
25
25
  model file, the first output of then_branch is typed float tensor
26
26
  with shape [2] and the first output of else_branch is another
27
27
  float tensor with shape [3], If's first output should have (a) no
28
28
  shape set, or (b) a shape of rank 1 with neither dim_value nor
29
29
  dim_param set, or (c) a shape of rank 1 with a unique dim_param.
30
30
  In contrast, the first output cannot have the shape [2] since [2]
31
31
  and [3] are not compatible.
32
32
  **Type Constraints**
33
33
  * **V** in (
34
- optional(seq(tensor(bfloat16))),
35
- optional(seq(tensor(bool))),
36
- optional(seq(tensor(complex128))),
37
- optional(seq(tensor(complex64))),
38
- optional(seq(tensor(double))),
39
- optional(seq(tensor(float))),
40
- optional(seq(tensor(float16))),
41
- optional(seq(tensor(int16))),
42
- optional(seq(tensor(int32))),
43
- optional(seq(tensor(int64))),
44
- optional(seq(tensor(int8))),
45
- optional(seq(tensor(string))),
46
- optional(seq(tensor(uint16))),
47
- optional(seq(tensor(uint32))),
48
- optional(seq(tensor(uint64))),
49
- optional(seq(tensor(uint8))),
50
- optional(tensor(bfloat16)),
51
- optional(tensor(bool)),
52
- optional(tensor(complex128)),
53
- optional(tensor(complex64)),
54
- optional(tensor(double)),
55
- optional(tensor(float)),
56
- optional(tensor(float16)),
57
- optional(tensor(int16)),
58
- optional(tensor(int32)),
59
- optional(tensor(int64)),
60
- optional(tensor(int8)),
61
- optional(tensor(string)),
62
- optional(tensor(uint16)),
63
- optional(tensor(uint32)),
64
- optional(tensor(uint64)),
65
- optional(tensor(uint8)),
66
- seq(tensor(bfloat16)),
67
- seq(tensor(bool)),
68
- seq(tensor(complex128)),
69
- seq(tensor(complex64)),
70
- seq(tensor(double)),
71
- seq(tensor(float)),
72
- seq(tensor(float16)),
73
- seq(tensor(int16)),
74
- seq(tensor(int32)),
75
- seq(tensor(int64)),
76
- seq(tensor(int8)),
77
- seq(tensor(string)),
78
- seq(tensor(uint16)),
79
- seq(tensor(uint32)),
80
- seq(tensor(uint64)),
81
- seq(tensor(uint8)),
82
- tensor(bfloat16),
83
34
  tensor(bool),
84
35
  tensor(complex128),
85
36
  tensor(complex64),
86
37
  tensor(double),
87
38
  tensor(float),
88
39
  tensor(float16),
89
40
  tensor(int16),
90
41
  tensor(int32),
91
42
  tensor(int64),
92
43
  tensor(int8),
93
44
  tensor(string),
94
45
  tensor(uint16),
95
46
  tensor(uint32),
96
47
  tensor(uint64),
97
48
  tensor(uint8)
98
49
  ):
50
+ All Tensor types
99
- All Tensor, Sequence(Tensor), Optional(Tensor), and
100
- Optional(Sequence(Tensor)) types
101
51
  * **B** in (
102
52
  tensor(bool)
103
53
  ):
104
54
  Only bool