class_docstr: Tests the correctness of the CorrelationCholesky bijector.
class_docstr_tok: ["Tests","the","correctness","of","the","CorrelationCholesky","bijector","."]
code: def testBijectorWithVariables(self):
      x_ = np.array([1.0], dtype=np.float32)
      y_ = np.array(
          [[1.0, 0.0], [0.707107, 0.707107]], dtype=np.float32
      )
  
      x = tf.Variable(x_, dtype=tf.float32)
      y = tf.Variable(y_, dtype=tf.float32)
      forward_event_ndims = tf.Variable(1, dtype=tf.int32)
      inverse_event_ndims = tf.Variable(2, dtype=tf.int32)
      self.evaluate(
          [
              v.initializer
              for v in (x, y, forward_event_ndims, inverse_event_ndims)
          ]
      )
  
      bijector = correlation_cholesky.CorrelationCholesky()
      self.assertAllClose(
          y_, self.evaluate(bijector.forward(x)), atol=1e-5, rtol=1e-5
      )
      self.assertAllClose(
          x_, self.evaluate(bijector.inverse(y)), atol=1e-5, rtol=1e-5
      )
  
      fldj = bijector.forward_log_det_jacobian(
          x, event_ndims=forward_event_ndims
      )
      self.assertAllClose(-3 * 0.5 * np.log(2), self.evaluate(fldj))
  
      ildj = bijector.inverse_log_det_jacobian(
          y, event_ndims=inverse_event_ndims
      )
      self.assertAllClose(3 * 0.5 * np.log(2), ildj)
  
imports: import itertools
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector
  from tensorflow_probability.python.bijectors import bijector_test_util
  from tensorflow_probability.python.bijectors import correlation_cholesky
  from tensorflow_probability.python.bijectors import fill_triangular
  from tensorflow_probability.python.distributions import beta
  from tensorflow_probability.python.distributions import cholesky_lkj
  from tensorflow_probability.python.distributions import lkj
  from tensorflow_probability.python.distributions.internal import statistical_testing
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.mcmc import hmc
  from tensorflow_probability.python.mcmc import sample
  from tensorflow_probability.python.mcmc import transformed_kernel
label_desc: Use image node_id 7 for calling the CorrelationCholeskyBijectorTest obj's underlying member method code with example usage: obj.testBijectorWithVariables() without return types