class_docstr: Monitor for Infinity and NaN in tensor values.
class_docstr_tok: ["Monitor","for","Infinity","and","NaN","in","tensor","values","."]
code: def on_execution(self, execution_index, execution):
      if self._limit > 0 and len(self._alerts) >= self._limit:
          return
      if (
          execution.tensor_debug_mode
          == debug_event_pb2.TensorDebugMode.FULL_TENSOR
      ):
          tensor_values = (
              self._debug_data_reader.execution_to_tensor_values(
                  execution
              )
          )
          for output_slot, tensor_value in enumerate(tensor_values):
              self._check_full_tensor_value(
                  tensor_value,
                  execution.wall_time,
                  execution.op_type,
                  output_slot,
                  execution_index=execution_index,
              )
      elif execution.debug_tensor_values:
          for output_slot, debug_tensor_value in enumerate(
              execution.debug_tensor_values
          ):
              self._check_debug_tensor_value(
                  execution.tensor_debug_mode,
                  debug_tensor_value,
                  execution.wall_time,
                  execution.op_type,
                  output_slot,
                  execution_index=execution_index,
              )
  
imports: import numpy
  from tensorflow.core.protobuf import debug_event_pb2
label_desc: Use image node_id 4 for calling the InfNanMonitor obj's underlying member method code with example usage: obj.on_execution(execution_index, execution) without return types