tf.compat.v1.add_check_numerics_ops  |  TensorFlow v2.16.1 (original) (raw)

tf.compat.v1.add_check_numerics_ops

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, thecheck_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.

Returns
A group op depending on all check_numerics ops 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.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.

Last updated 2024-04-26 UTC.