<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/probability/blob/v0.25.0/tensorflow_probability/python/experimental/auto_batching/instructions.py#L658-L681) |

A conditional.

#### View aliases


**Main aliases**

[`tfp.experimental.auto_batching.frontend.instructions.BranchOp`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/instructions/BranchOp), [`tfp.experimental.auto_batching.frontend.st.inst.BranchOp`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/instructions/BranchOp), [`tfp.experimental.auto_batching.frontend.stack.inst.BranchOp`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/instructions/BranchOp), [`tfp.experimental.auto_batching.stack_optimization.inst.BranchOp`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/instructions/BranchOp), [`tfp.experimental.auto_batching.stackless.inst.BranchOp`](https://www.tensorflow.org/probability/api_docs/python/tfp/experimental/auto_batching/instructions/BranchOp)

<br />

    tfp.experimental.auto_batching.instructions.BranchOp(
        cond_var, true_block, false_block
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `cond_var` | The string name of the VM variable holding the condition. This variable must have boolean dtype and scalar data shape. |
| `true_block` | The `Block` where to transfer logical threads whose condition is `True`. |
| `false_block` | The `Block` where to transfer logical threads whose condition is `False`. |

<br />

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `cond_var` | A `namedtuple` alias for field number 0 |
| `true_block` | A `namedtuple` alias for field number 1 |
| `false_block` | A `namedtuple` alias for field number 2 |

<br />