See the guide: Control Flow > Debugging Operations
check_numerics to every floating point tensor.
check_numerics operations themselves are added for each
double tensor in the graph. For all ops in the graph, the
check_numerics op for all of its (
is guaranteed to run before the
check_numerics op on any of its outputs.
group op depending on all
check_numerics ops added.
ValueError: If the graph contains any numeric operations in a control flow structure.
RuntimeError: If called with eager execution enabled.
Not compatible with eager execution. To check for
eager execution, call tfe.seterr(inf_or_nan='raise') once before executing
the checked operations.