<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/keras-team/keras/tree/v3.15.1/keras/src/ops/core.py#L1206-L1219) |

Check whether the given object is a tensor.

    tf.keras.ops.is_tensor(
        x
    )

> [!NOTE]
> **Note:** This checks for backend specific tensors so passing a TensorFlow tensor would return `False` if your backend is PyTorch or JAX.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | A variable. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| `True` if `x` is a tensor, otherwise `False`. ||

<br />