class_docstr: Applies a Bijector to the diagonal of a matrix.
  
  #### Example
  
  ```python
  b = tfb.TransformDiagonal(diag_bijector=tfb.Exp())
  
  b.forward([[1., 0.],
             [0., 1.]])
  # ==> [[2.718, 0.],
         [0., 2.718]]
  ```
class_docstr_tok: ["Applies","a","Bijector","to","the","diagonal","of","a","matrix",".","#","#","#","#","Example","``","`","python","b","=","tfb.TransformDiagonal","(","diag_bijector=tfb.Exp","(",")",")","b.forward","(","[","[","1.",",","0",".","]",",","[","0.",",","1",".","]","]",")","#","==",">","[","[","2.718",",","0",".","]",",","[","0.",",","2.718","]","]","``","`"]
docstr: Instantiates the `TransformDiagonal` bijector.
  
  Args:
    diag_bijector: `Bijector` instance used to transform the diagonal.
    validate_args: Python `bool` indicating whether arguments should be
      checked for correctness.
    name: Python `str` name given to ops managed by this object.
docstr_tok: ["Instantiates","the","`","TransformDiagonal","`","bijector",".","Args",":","diag_bijector",":","`","Bijector","`","instance","used","to","transform","the","diagonal",".","validate_args",":","Python","`","bool","`","indicating","whether","arguments","should","be","checked","for","correctness",".","name",":","Python","`","str","`","name","given","to","ops","managed","by","this","object","."]
code: def __init__(
      self,
      diag_bijector,
      validate_args=False,
      name="transform_diagonal",
  ):
      """Instantiates the `TransformDiagonal` bijector.
  
      Args:
        diag_bijector: `Bijector` instance used to transform the diagonal.
        validate_args: Python `bool` indicating whether arguments should be
          checked for correctness.
        name: Python `str` name given to ops managed by this object.
      """
      parameters = dict(locals())
      with tf.name_scope(name) as name:
          self._diag_bijector = diag_bijector
          super(TransformDiagonal, self).__init__(
              forward_min_event_ndims=2,
              inverse_min_event_ndims=2,
              is_constant_jacobian=diag_bijector.is_constant_jacobian,
              validate_args=validate_args,
              dtype=diag_bijector.dtype,
              parameters=parameters,
              name=name,
          )
  
file_path: probability/tensorflow_probability/python/bijectors/transform_diagonal.py
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector
label_desc: Use image node_id 1 to create a new TransformDiagonal object from inherited base classes: bijector with example: obj = TransformDiagonal(diag_bijector, validate_args, name)