class_docstr: Tests correctness of the `Transpose` bijector.
class_docstr_tok: ["Tests","correctness","of","the","`","Transpose","`","bijector","."]
code: def testPartialStaticPermEventShapes(self):
      if tf.executing_eagerly():
          return  # this test is not interesting in eager.
      perm = tf.convert_to_tensor(
          value=[
              tf.constant(2),
              tf1.placeholder_with_default(0, []),
              tf1.placeholder_with_default(1, []),
          ]
      )
      self.assertAllEqual(
          [2, None, None], tf.get_static_value(perm, partial=True)
      )
      b = transpose.Transpose(perm)
      self.assertAllEqual(
          [8, 5, None, None],
          b.forward_event_shape([8, 7, 6, 5]).as_list(),
      )
      self.assertAllEqual(
          [8, None, None, 7],
          b.inverse_event_shape([8, 7, 6, 5]).as_list(),
      )
  
      # Process of elimination should allow us to deduce one non-static perm idx.
      perm = tf.convert_to_tensor(
          value=[
              tf.constant(2),
              tf1.placeholder_with_default(0, []),
              tf.constant(1),
          ]
      )
      self.assertAllEqual(
          [2, None, 1], tf.get_static_value(perm, partial=True)
      )
      b = transpose.Transpose(perm)
      self.assertAllEqual(
          [8, 5, 7, 6], b.forward_event_shape([8, 7, 6, 5])
      )
      self.assertAllEqual(
          [8, 6, 5, 7], b.inverse_event_shape([8, 7, 6, 5])
      )
  
imports: import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import invert
  from tensorflow_probability.python.bijectors import transpose
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 7 for calling the _TransposeBijectorTest obj's underlying member method code with example usage: obj.testPartialStaticPermEventShapes() without return types