class_docstr: Gradients Debugger.
  
  Allows retrieval of gradient tensors created by TensorFlow's automatic
  differentiation algorithm, i.e., `tf.gradients` and optimizer classes that
  use it.
class_docstr_tok: ["Gradients","Debugger",".","Allows","retrieval","of","gradient","tensors","created","by","TensorFlow","'s","automatic","differentiation","algorithm",",","i.e.",",","`","tf.gradients","`","and","optimizer","classes","that","use","it","."]
docstr: Constructor of GradientsDebugger.
  
  Args:
    y_tensor: optional: the `tf.Tensor` to be differentiated, i.e., the tensor
      on the numerator of the differentiation.
docstr_tok: ["Constructor","of","GradientsDebugger",".","Args",":","y_tensor",":","optional",":","the","`","tf.Tensor","`","to","be","differentiated",",","i.e.",",","the","tensor","on","the","numerator","of","the","differentiation","."]
code: def __init__(self, y_tensor=None):
      """Constructor of GradientsDebugger.
  
      Args:
        y_tensor: optional: the `tf.Tensor` to be differentiated, i.e., the tensor
          on the numerator of the differentiation.
      """
  
      self._uuid = uuid.uuid4().hex
      _gradient_debuggers[self._uuid] = self
  
      # A dict mapping x-tensor names to gradient tensor. x-tensor refers to the
      # independent tf.Tensor, i.e., the tensor on the denominator of the
      # differentiation.
      self._gradient_tensors = {}
      self._y_tensor = y_tensor
  
      self._graph = None
      if y_tensor:
          self._graph = y_tensor.graph
  
      self._is_active_context = False
  
imports: import re
  import uuid
  from tensorflow.python.debug.lib import debug_data
  from tensorflow.python.debug.lib import debug_graphs
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.ops import gen_array_ops
  from tensorflow.python.ops import variables
label_desc: Use image node_id 1 to create a new GradientsDebugger object  with example: obj = GradientsDebugger(y_tensor)