public final class **Where3** Selects elements from \`x\` or \`y\`, depending on \`condition\`.


The \`x\`, and \`y\` tensors must all have the same shape, and the
output will also have that shape.


The \`condition\` tensor must be a scalar if \`x\` and \`y\` are scalars.
If \`x\` and \`y\` are vectors or higher rank, then \`condition\` must be either a
scalar, a vector with size matching the first dimension of \`x\`, or must have
the same shape as \`x\`.


The \`condition\` tensor acts as a mask that chooses, based on the value at each
element, whether the corresponding element / row in the output should be
taken from \`x\` (if true) or \`y\` (if false).


If \`condition\` is a vector and \`x\` and \`y\` are higher rank matrices, then
it chooses which row (outer dimension) to copy from \`x\` and \`y\`.
If \`condition\` has the same shape as \`x\` and \`y\`, then it chooses which
element to copy from \`x\` and \`y\`.


For example:

    # 'condition' tensor is [[True,  False]
     #                        [False, True]]
     # 't' is [[1, 2],
     #         [3, 4]]
     # 'e' is [[5, 6],
     #         [7, 8]]
     select(condition, t, e)  # =&gt; [[1, 6], [7, 4]]
     
     
     # 'condition' tensor is [True, False]
     # 't' is [[1, 2],
     #         [3, 4]]
     # 'e' is [[5, 6],
     #         [7, 8]]
     select(condition, t, e) ==&gt; [[1, 2],
                                  [7, 8]]
     
     
<br />

<br />

<br />

<br />

<br />

<br />

### Public Methods

|---|---|
| [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<T\> | [asOutput](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/Where3#asOutput())() Returns the symbolic handle of a tensor. |
| static \<T\> [Where3](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/Where3)\<T\> | [create](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/Where3#create(org.tensorflow.op.Scope,%20org.tensorflow.Operand<java.lang.Boolean>,%20org.tensorflow.Operand<T>,%20org.tensorflow.Operand<T>))([Scope](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/Scope) scope, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Boolean\> condition, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<T\> x, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<T\> y) Factory method to create a class wrapping a new Where3 operation. |
| [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<T\> | [output](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/Where3#output())() = A \`Tensor\` with the same type and shape as \`x\` and \`y\`. |

### Inherited Methods

From class [org.tensorflow.op.PrimitiveOp](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp)

|---|---|
| final boolean | [equals](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#equals(java.lang.Object))(Object obj) |
| final int | [hashCode](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#hashCode())() |
| [Operation](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operation) | [op](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#op())() Returns the underlying `https://www.tensorflow.org/api_docs/java/org/tensorflow/Operation` |
| final String | [toString](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/PrimitiveOp#toString())() |

From class java.lang.Object

|---|---|
| boolean | equals(Object arg0) |
| final Class\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| String | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

From interface [org.tensorflow.Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)

|---|---|
| abstract [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<T\> | [asOutput](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand#asOutput())() Returns the symbolic handle of a tensor. |

## Public Methods

#### public [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<T\>
**asOutput**
()

Returns the symbolic handle of a tensor.

Inputs to TensorFlow operations are outputs of another TensorFlow operation. This method is
used to obtain a symbolic handle that represents the computation of the input.

<br />

#### public static [Where3](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/core/Where3)\<T\>
**create**
([Scope](https://www.tensorflow.org/api_docs/java/org/tensorflow/op/Scope) scope, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<Boolean\> condition, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<T\> x, [Operand](https://www.tensorflow.org/api_docs/java/org/tensorflow/Operand)\<T\> y)

Factory method to create a class wrapping a new Where3 operation.

##### Parameters

| scope | current scope |
| x | = A \`Tensor\` which may have the same shape as \`condition\`. If \`condition\` is rank 1, \`x\` may have higher rank, but its first dimension must match the size of \`condition\`. |
| y | = A \`Tensor\` with the same type and shape as \`x\`. |
|---|---|

##### Returns

- a new instance of Where3

#### public [Output](https://www.tensorflow.org/api_docs/java/org/tensorflow/Output)\<T\>
**output**
()

= A \`Tensor\` with the same type and shape as \`x\` and \`y\`.