class_docstr: A bijector to transform channels into spatial pixels.
class_docstr_tok: ["A","bijector","to","transform","channels","into","spatial","pixels","."]
code: def __init__(
      self, input_shape, block_size=2, validate_args=False, name=None
  ):
      parameters = dict(locals())
      self._block_size = block_size
      _, h, w, c = prefer_static.split(input_shape, [-1, 1, 1, 1])
      h, w, c = h[0], w[0], c[0]
      n = self._block_size
      b = [
          reshape.Reshape(
              event_shape_out=[h * n, w * n, c // n**2],
              event_shape_in=[h, n, w, n, c // n**2],
          ),
          transpose.Transpose(perm=[0, 3, 1, 4, 2]),
          reshape.Reshape(
              event_shape_in=[h, w, c],
              event_shape_out=[h, w, c // n**2, n, n],
          ),
      ]
      super(Expand, self).__init__(
          bijectors=chain.Chain(b, validate_args=validate_args),
          name=name or "Expand",
          parameters=parameters,
      )
  
imports: import functools
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector
  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 exp
  from tensorflow_probability.python.bijectors import identity
  from tensorflow_probability.python.bijectors import invert
  from tensorflow_probability.python.bijectors import real_nvp
  from tensorflow_probability.python.bijectors import reshape
  from tensorflow_probability.python.bijectors import scale
  from tensorflow_probability.python.bijectors import scale_matvec_lu
  from tensorflow_probability.python.bijectors import shift
  from tensorflow_probability.python.bijectors import transpose
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import tf_keras
  from tensorflow_probability.python.util.deferred_tensor import TransformedVariable
  from tensorflow_probability.python.util.seed_stream import SeedStream
label_desc: Use image node_id 1 to create a new Expand object from inherited base classes: composition with example: obj = Expand(input_shape, block_size, validate_args, name)