Connect a tf.debugging.check_numerics to every floating point tensor.
tf.compat.v1.add_check_numerics_ops()
check_numerics operations themselves are added for each half, float, or double tensor in the current default graph. For all ops in the graph, the check_numerics op for all of its (half, float, or double) inputs is guaranteed to run before the check_numerics op on any of its outputs.
Note: This API is not compatible with the use oftf.condortf.while_loop, and will raise aValueErrorif you attempt to call it in such a graph.
| Returns | |
|---|---|
| A groupop depending on allcheck_numericsops added. | 
| Raises | |
|---|---|
| ValueError | If the graph contains any numeric operations in a control flow structure. | 
| RuntimeError | If called with eager execution enabled. | 
eager compatibility
Not compatible with eager execution. To check for Infs and NaNs under eager execution, call tf.debugging.enable_check_numerics() once before executing the checked operations.
    © 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
    https://www.tensorflow.org/versions/r2.9/api_docs/python/tf/compat/v1/add_check_numerics_ops