# tf.experimental.dtensor.is_dtensor

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.13.1/tensorflow/dtensor/python/api.py#L126-L139) |

Check whether the input tensor is a DTensor.

    tf.experimental.dtensor.is_dtensor(
        tensor
    ) -> bool

In Python, a DTensor has the same type as a [`tf.Tensor`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/Tensor). This method will
let you check and handle the tensor differently if a tf.Tensor is a DTensor.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `tensor` | an object to be checked. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| bool, True if the given tensor is a DTensor. ||

<br />