class_docstr: Scale certain gradient by a multiplier.
class_docstr_tok: ["Scale","certain","gradient","by","a","multiplier","."]
code: def _mapper(self, grad, var):
      varname = var.op.name
      for regex, val in self.multipliers:
          # always match against the whole name
          if not regex.endswith("$"):
              regex = regex + "$"
  
          if re.match(regex, varname):
              if self._verbose:
                  logger.info(
                      "Gradient of '{}' is multipled by {}".format(
                          varname, val
                      )
                  )
              if val != 0:  # skip zero to speed up
                  return grad * val
              else:
                  return None
      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 ScaleGradient obj's underlying member method code with example usage: obj._mapper(grad, var) and returns: grad, unknown, None