class_docstr: Tests correctness of the absolute value bijector.
code: def testBijectorVersusNumpyRewriteOfBasicFunctionsEventNdims0(self):
      bijector = absolute_value.AbsoluteValue(validate_args=True)
      self.assertStartsWith(bijector.name, "absolute_value")
      x = tf.constant(
          [[0.0, 1.0, -1], [0.0, -5.0, 3.0]]
      )  # Shape [2, 3]
      y = tf.math.abs(x)
  
      y_ = self.evaluate(y)
  
      self.assertAllClose(y_, self.evaluate(bijector.forward(x)))
      self.assertAllClose((-y_, y_), self.evaluate(bijector.inverse(y)))
      self.assertAllClose(
          (0.0, 0.0),
          self.evaluate(
              bijector.inverse_log_det_jacobian(y, event_ndims=0)
          ),
      )
  
      # Run things twice to make sure there are no issues in caching the tuples
      # returned by .inverse*
      self.assertAllClose(y_, self.evaluate(bijector.forward(x)))
      self.assertAllClose((-y_, y_), self.evaluate(bijector.inverse(y)))
      self.assertAllClose(
          (0.0, 0.0),
          self.evaluate(
              bijector.inverse_log_det_jacobian(y, event_ndims=0)
          ),
      )
  
file_path: probability/tensorflow_probability/python/bijectors/absolute_value_test.py
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import absolute_value
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 1 for calling the AbsoluteValueTest obj's underlying member method code with example usage: obj.testBijectorVersusNumpyRewriteOfBasicFunctionsEventNdims0() without return types