class_docstr: Tests correctness of the Permute bijector.
class_docstr_tok: ["Tests","correctness","of","the","Permute","bijector","."]
code: def testPreservesShape(self):
      # TODO(b/131157549, b/131124359): Test should not be needed. Consider
      # deleting when underlying issue with constant eager tensors is fixed.
      permutation = [2, 1, 0]
      x = tf_keras.Input((3,), batch_size=None)
      bijector = permute.Permute(
          permutation=permutation, axis=-1, validate_args=True
      )
  
      y = bijector.forward(x)
      self.assertAllEqual(y.shape.as_list(), [None, 3])
  
      inverse_y = bijector.inverse(x)
      self.assertAllEqual(inverse_y.shape.as_list(), [None, 3])
  
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 6 for calling the PermuteBijectorTest obj's underlying member method code with example usage: obj.testPreservesShape() without return types