class_docstr: Run :func:`tf.check_numerics` for each gradient.
class_docstr_tok: ["Run",":","func",":","`","tf.check_numerics","`","for","each","gradient","."]
code: def _mapper(self, grad, var):
      # this was very slow.... see #3649
      # op = tf.Assert(tf.reduce_all(tf.is_finite(var)), [var], summarize=100)
      grad = tf.check_numerics(grad, "CheckGradient/" + var.op.name)
      return grad
  
imports: import inspect
  import re
  from abc import ABCMeta, abstractmethod
  import six
  import tensorflow
  from ..compat import tfv1
  from ..utils import logger
  from .summary import add_moving_summary
  from .symbolic_functions import print_stat, rms
label_desc: Use image node_id 2 for calling the CheckGradient obj's underlying member method code with example usage: obj._mapper(grad, var) and returns: grad