# tf.guarantee_const

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.13.1/tensorflow/python/ops/array_ops.py#L6817-L6833) |

Promise to the TF runtime that the input tensor is a constant. (deprecated)

#### View aliases


**Compat aliases for migration**

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

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

<br />

    tf.guarantee_const(
        input, name=None
    )

> [!WARNING]
> **Deprecated:** THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Not for public use.

The runtime is then free to make optimizations based on this.

Returns the input tensor without modification.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `input` | A `Tensor`. |
| `name` | A name for this operation. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A `Tensor`. Has the same dtype as `input`. ||

<br />