# tf.raw_ops.OptionalHasValue

<br />

Returns true if and only if the given Optional variant has a value.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.raw_ops.OptionalHasValue`](https://www.tensorflow.org/api_docs/python/tf/raw_ops/OptionalHasValue)

<br />

    tf.raw_ops.OptionalHasValue(
        optional, name=None
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `optional` | A `Tensor` of type `variant`. |
| `name` | A name for the operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A `Tensor` of type `bool`. ||

<br />