class_docstr: Tests the correctness of the Y = X @ X.T transformation.
class_docstr_tok: ["Tests","the","correctness","of","the","Y","=","X","@","X.T","transformation","."]
code: def testCholeskyFn(self):
      def robust_cholesky(x):
          return tf.linalg.cholesky(
              tf.linalg.set_diag(x, tf.linalg.diag_part(x) + 1.0)
          )
  
      bijector = cholesky_outer_product.CholeskyOuterProduct(
          cholesky_fn=robust_cholesky
      )
      # We'll add one to the diagonal, so we'll expect the inverse to be
      # the `sqrt(diagonal + 1)`.
      x = 3 * np.eye(3)
      self.assertAllClose(
          2.0 * np.eye(3), self.evaluate(bijector.inverse(x))
      )
  
file_path: probability/tensorflow_probability/python/bijectors/cholesky_outer_product_test.py
imports: import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import cholesky_outer_product
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 2 for calling the CholeskyOuterProductBijectorTest obj's underlying member method code with example usage: obj.testCholeskyFn() and returns: tf