class_docstr: Print the gradients every step with :func:`symbolic_functions.print_stat`.
class_docstr_tok: ["Print","the","gradients","every","step","with",":","func",":","`","symbolic_functions.print_stat","`","."]
code: def _mapper(self, grad, var):
      name = var.op.name
      if name not in PrintGradient._printed:
          PrintGradient._printed.add(name)
          grad = print_stat(grad, message=name + "-grad")
      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 PrintGradient obj's underlying member method code with example usage: obj._mapper(grad, var) and returns: grad