<br />

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

Check whether the input tensor is a DTensor.

```python
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.15/api_docs/python/tf/Tensor.md.txt). 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 />