If - 11 vs 13

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