If - 11 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. If11 → If13 +1 -16
If11 → If13 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
- seq(tensor(bool)),
35
- seq(tensor(complex128)),
36
- seq(tensor(complex64)),
37
- seq(tensor(double)),
38
- seq(tensor(float)),
39
- seq(tensor(float16)),
40
- seq(tensor(int16)),
41
- seq(tensor(int32)),
42
- seq(tensor(int64)),
43
- seq(tensor(int8)),
44
- seq(tensor(string)),
45
- seq(tensor(uint16)),
46
- seq(tensor(uint32)),
47
- seq(tensor(uint64)),
48
- seq(tensor(uint8)),
49
34
  tensor(bool),
50
35
  tensor(complex128),
51
36
  tensor(complex64),
52
37
  tensor(double),
53
38
  tensor(float),
54
39
  tensor(float16),
55
40
  tensor(int16),
56
41
  tensor(int32),
57
42
  tensor(int64),
58
43
  tensor(int8),
59
44
  tensor(string),
60
45
  tensor(uint16),
61
46
  tensor(uint32),
62
47
  tensor(uint64),
63
48
  tensor(uint8)
64
49
  ):
65
- All Tensor and Sequence types
50
+ All Tensor types
66
51
  * **B** in (
67
52
  tensor(bool)
68
53
  ):
69
54
  Only bool