class_docstr: Tests correctness of the Permute bijector.
class_docstr_tok: ["Tests","correctness","of","the","Permute","bijector","."]
code: def testBijector(self):
      expected_permutation = np.int32([2, 0, 1])
      expected_x = np.random.randn(4, 2, 3)
      expected_y = expected_x[..., expected_permutation]
  
      permutation_ph = tf1.placeholder_with_default(
          expected_permutation, shape=None
      )
      bijector = permute.Permute(
          permutation=permutation_ph, validate_args=True
      )
      [
          permutation_,
          x_,
          y_,
          fldj,
          ildj,
      ] = self.evaluate(
          [
              bijector.permutation,
              bijector.inverse(expected_y),
              bijector.forward(expected_x),
              bijector.forward_log_det_jacobian(
                  expected_x, event_ndims=1
              ),
              bijector.inverse_log_det_jacobian(
                  expected_y, event_ndims=1
              ),
          ]
      )
      self.assertStartsWith(bijector.name, "permute")
      self.assertAllEqual(expected_permutation, permutation_)
      self.assertAllClose(expected_y, y_, rtol=1e-6, atol=0)
      self.assertAllClose(expected_x, x_, rtol=1e-6, atol=0)
      self.assertAllClose(0.0, fldj, rtol=1e-6, atol=0)
      self.assertAllClose(0.0, ildj, rtol=1e-6, atol=0)
  
file_path: probability/tensorflow_probability/python/bijectors/permute_test.py
imports: import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector_test_util
  from tensorflow_probability.python.bijectors import permute
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.internal import tf_keras
label_desc: Use image node_id 3 for calling the PermuteBijectorTest obj's underlying member method code with example usage: obj.testBijector() without return types