tfdbg.has_inf_or_nan( datum, tensor )
Defined in tensorflow/python/debug/lib/debug_data.py
.
See the guide: TensorFlow Debugger > Tensor-value predicates
A predicate for whether a tensor consists of any bad numerical values.
This predicate is common enough to merit definition in this module. Bad numerical values include nan
s and inf
s. The signature of this function follows the requirement of the method DebugDumpDir.find()
.
datum
: (DebugTensorDatum
) Datum metadata.tensor
: (numpy.ndarray
or None) Value of the tensor. None represents an uninitialized tensor.(bool
) True if and only if tensor consists of any nan or inf values.
© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tfdbg/has_inf_or_nan