docstr: This tests that the model can take samples in variable dimensions.
docstr_tok: ["This","tests","that","the","model","can","take","samples","in","variable","dimensions","."]
code: def testMultiDimensionalSampling(self):
      """This tests that the model can take samples in variable dimensions."""
  
      def dummy_glow_net(input_shape):
          del input_shape
          return lambda x: identity.Identity()
  
      def dummy_exit_net(input_shape, output_chan):
          del input_shape, output_chan
          return lambda x: identity.Identity()
  
      bijection = glow.Glow(
          output_shape=self.output_shape,
          num_glow_blocks=2,
          num_steps_per_block=1,
          coupling_bijector_fn=dummy_glow_net,
          exit_bijector_fn=dummy_exit_net,
          grab_after_block=[0.5, 0.5],
          use_actnorm=False,
      )
      dist = bijection(
          independent.Independent(
              normal.Normal(
                  tf.zeros([16 * 16 * 3]), tf.ones(16 * 16 * 3)
              ),
              reinterpreted_batch_ndims=1,
          )
      )
  
      single_samp2 = dist.sample(1)
      single_samp3 = dist.sample([1, 1])
      single_samp = dist.sample()
      self.assertShapeEqual(np.zeros([16, 16, 3]), single_samp)
      self.assertShapeEqual(np.zeros([1, 16, 16, 3]), single_samp2)
      self.assertShapeEqual(np.zeros([1, 1, 16, 16, 3]), single_samp3)
  
imports: import functools
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector_test_util
  from tensorflow_probability.python.bijectors import blockwise
  from tensorflow_probability.python.bijectors import chain
  from tensorflow_probability.python.bijectors import composition
  from tensorflow_probability.python.bijectors import glow
  from tensorflow_probability.python.bijectors import identity
  from tensorflow_probability.python.bijectors import pad
  from tensorflow_probability.python.bijectors import sigmoid
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.internal import tf_keras
  from tensorflow_probability.python.math.gradient import batch_jacobian
label_desc: Use image node_id 11 for calling the GlowTest obj's underlying member method code with example usage: obj.testMultiDimensionalSampling() and returns: function, function