class_docstr: Maps the Cholesky factor of `M` to the Cholesky factor of `M^{-1}`.
  
  The `forward` and `inverse` calculations are conceptually identical to:
  
  ```python
  def forward(x):
    return tf.linalg.cholesky(tf.linalg.inv(tf.matmul(x, x, adjoint_b=True)))
  
  inverse = forward
  ```
  
  or, similarly,
  
  ```python
  tfb = tfp.bijectors
  CholeskyToInvCholesky = tfb.Chain([
      tfb.Invert(tfb.CholeskyOuterProduct()),
      tfb.MatrixInverse(),
      tfb.CholeskyOuterProduct(),
  ])
  ```
  
  However, the actual calculations exploit the triangular structure of the
  matrices.
class_docstr_tok: ["Maps","the","Cholesky","factor","of","`","M","`","to","the","Cholesky","factor","of","`","M^","{","-1","}","`",".","The","`","forward","`","and","`","inverse","`","calculations","are","conceptually","identical","to",":","``","`","python","def","forward","(","x",")",":","return","tf.linalg.cholesky","(","tf.linalg.inv","(","tf.matmul","(","x",",","x",",","adjoint_b=True",")",")",")","inverse","=","forward","``","`","or",",","similarly",",","``","`","python","tfb","=","tfp.bijectors","CholeskyToInvCholesky","=","tfb.Chain","(","[","tfb.Invert","(","tfb.CholeskyOuterProduct","(",")",")",",","tfb.MatrixInverse","(",")",",","tfb.CholeskyOuterProduct","(",")",",","]",")","``","`","However",",","the","actual","calculations","exploit","the","triangular","structure","of","the","matrices","."]
code: def _assertions(self, x):
      if not self.validate_args:
          return []
      x_shape = tf.shape(x)
      is_matrix = assert_util.assert_rank_at_least(
          x, 2, message="Input must have rank at least 2."
      )
      is_square = assert_util.assert_equal(
          x_shape[-2],
          x_shape[-1],
          message="Input must be a square matrix.",
      )
      diag_part_x = tf.linalg.diag_part(x)
      is_lower_triangular = assert_util.assert_equal(
          tf.linalg.band_part(x, 0, -1),  # Preserves triu, zeros rest.
          tf.linalg.diag(diag_part_x),
          message="Input must be lower triangular.",
      )
      is_positive_diag = assert_util.assert_positive(
          diag_part_x,
          message="Input must have all positive diagonal entries.",
      )
      return [
          is_matrix,
          is_square,
          is_lower_triangular,
          is_positive_diag,
      ]
  
file_path: probability/tensorflow_probability/python/bijectors/cholesky_to_inv_cholesky.py
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector
  from tensorflow_probability.python.bijectors.cholesky_outer_product import CholeskyOuterProduct
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
label_desc: Use image node_id 5 for calling the CholeskyToInvCholesky obj's underlying member method code with example usage: obj._assertions(x) and returns: list, list