parameters: ()
return_statement: return control_flow_ops.group(*check_op)
docstring: Connect a `check_numerics` to every floating point tensor.
  
    `check_numerics` operations themselves are added for each `half`, `float`,
    or `double` tensor in the 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.
  
    Returns:
      A `group` op depending on all `check_numerics` ops added.
docstring_summary: Connect a `check_numerics` to every floating point tensor.
docstring_tokens: Connect a check_numerics to every floating point tensor .
function: def add_check_numerics_ops():
    """Connect a `check_numerics` to every floating point tensor.
  
    `check_numerics` operations themselves are added for each `half`, `float`,
    or `double` tensor in the 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.
  
    Returns:
      A `group` op depending on all `check_numerics` ops added.
    """
    check_op = []
    # This code relies on the ordering of ops in get_operations().
    # The producer of a tensor always comes before that tensor's consumer in
    # this list. This is true because get_operations() returns ops in the order
    # added, and an op can only be added after its inputs are added.
    for op in ops.get_default_graph().get_operations():
      for output in op.outputs:
        if output.dtype in [dtypes.float16, dtypes.float32, dtypes.float64]:
          message = op.name + ":" + str(output.value_index)
          with ops.control_dependencies(check_op):
            check_op = [array_ops.check_numerics(output, message=message)]
    return control_flow_ops.group(*check_op)
function_tokens: def add_check_numerics_ops ( ) : check_op = [ ] # This code relies on the ordering of ops in get_operations(). # The producer of a tensor always comes before that tensor's consumer in # this list. This is true because get_operations() returns ops in the order # added, and an op can only be added after its inputs are added. for op in ops . get_default_graph ( ) . get_operations ( ) : for output in op . outputs : if output . dtype in [ dtypes . float16 , dtypes . float32 , dtypes . float64 ] : message = op . name + ":" + str ( output . value_index ) with ops . control_dependencies ( check_op ) : check_op = [ array_ops . check_numerics ( output , message = message ) ] return control_flow_ops . group ( * check_op )