# tf.debugging.assert_all_finite

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 1 version](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/debugging/assert_all_finite) | [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.4.0/tensorflow/python/ops/numerics.py#L54-L72) |

Assert that the tensor does not contain any NaN's or Inf's.

    tf.debugging.assert_all_finite(
        x, message, name=None
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | Tensor to check. |
| `message` | Message to log on failure. |
| `name` | A name for this operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Same tensor as `x`. ||

<br />