docstr: Construct Pixel CNN++ distribution.
  
  Parameters
  ----------
  image_shape
      3D `TensorShape` or tuple for the `[height, width, channels]` dimensions of the image.
  conditional_shape
      `TensorShape` or tuple for the shape of the conditional input, or `None` if there is no conditional input.
  num_resnet
      The number of layers (shown in Figure 2 of [2]) within each highest-level block of Figure 2 of [1].
  num_hierarchies
      The number of highest-level blocks (separated by expansions/contractions of dimensions in Figure 2 of [1].)
  num_filters
      The number of convolutional filters.
  num_logistic_mix
      Number of components in the logistic mixture distribution.
  receptive_field_dims
      Height and width in pixels of the receptive field of the convolutional layers above and to the left
      of a given pixel. The width (second element of the tuple) should be odd. Figure 1 (middle) of [2]
      shows a receptive field of (3, 5) (the row containing the current pixel is included in the height).
      The default of (3, 3) was used to produce the results in [1].
  dropout_p
      The dropout probability. Should be between 0 and 1.
  resnet_activation
      The type of activation to use in the resnet blocks. May be 'concat_elu', 'elu', or 'relu'.
  l2_weight
      The L2 regularization weight.
  use_weight_norm
      If `True` then use weight normalization (works only in Eager mode).
  use_data_init
      If `True` then use data-dependent initialization (has no effect if `use_weight_norm` is `False`).
  high
      The maximum value of the input data (255 for an 8-bit image).
  low
      The minimum value of the input data.
  dtype
      Data type of the `Distribution`.
  name
      The name of the `Distribution`.
code: def __init__(
      self,
      image_shape: tuple,
      conditional_shape: tuple = None,
      num_resnet: int = 5,
      num_hierarchies: int = 3,
      num_filters: int = 160,
      num_logistic_mix: int = 10,
      receptive_field_dims: tuple = (3, 3),
      dropout_p: float = 0.5,
      resnet_activation: str = "concat_elu",
      l2_weight: float = 0.0,
      use_weight_norm: bool = True,
      use_data_init: bool = True,
      high: int = 255,
      low: int = 0,
      dtype=tf.float32,
      name: str = "PixelCNN",
  ) -> None:
      """
      Construct Pixel CNN++ distribution.
  
      Parameters
      ----------
      image_shape
          3D `TensorShape` or tuple for the `[height, width, channels]` dimensions of the image.
      conditional_shape
          `TensorShape` or tuple for the shape of the conditional input, or `None` if there is no conditional input.
      num_resnet
          The number of layers (shown in Figure 2 of [2]) within each highest-level block of Figure 2 of [1].
      num_hierarchies
          The number of highest-level blocks (separated by expansions/contractions of dimensions in Figure 2 of [1].)
      num_filters
          The number of convolutional filters.
      num_logistic_mix
          Number of components in the logistic mixture distribution.
      receptive_field_dims
          Height and width in pixels of the receptive field of the convolutional layers above and to the left
          of a given pixel. The width (second element of the tuple) should be odd. Figure 1 (middle) of [2]
          shows a receptive field of (3, 5) (the row containing the current pixel is included in the height).
          The default of (3, 3) was used to produce the results in [1].
      dropout_p
          The dropout probability. Should be between 0 and 1.
      resnet_activation
          The type of activation to use in the resnet blocks. May be 'concat_elu', 'elu', or 'relu'.
      l2_weight
          The L2 regularization weight.
      use_weight_norm
          If `True` then use weight normalization (works only in Eager mode).
      use_data_init
          If `True` then use data-dependent initialization (has no effect if `use_weight_norm` is `False`).
      high
          The maximum value of the input data (255 for an 8-bit image).
      low
          The minimum value of the input data.
      dtype
          Data type of the `Distribution`.
      name
          The name of the `Distribution`.
      """
      parameters = dict(locals())
      with tf.name_scope(name) as name:
          super(PixelCNN, self).__init__(
              dtype=dtype,
              reparameterization_type=reparameterization.NOT_REPARAMETERIZED,
              validate_args=False,
              allow_nan_stats=True,
              parameters=parameters,
              name=name,
          )
  
          if not tensorshape_util.is_fully_defined(image_shape):
              raise ValueError("`image_shape` must be fully defined.")
  
          if (
              conditional_shape is not None
              and not tensorshape_util.is_fully_defined(
                  conditional_shape
              )
          ):
              raise ValueError(
                  "`conditional_shape` must be fully defined`"
              )
  
          if tensorshape_util.rank(image_shape) != 3:
              raise ValueError(
                  "`image_shape` must have length 3, representing [height, width, channels] dimensions."
              )
  
          self._high = tf.cast(high, self.dtype)
          self._low = tf.cast(low, self.dtype)
          self._num_logistic_mix = num_logistic_mix
          self.network = _PixelCNNNetwork(
              dropout_p=dropout_p,
              num_resnet=num_resnet,
              num_hierarchies=num_hierarchies,
              num_filters=num_filters,
              num_logistic_mix=num_logistic_mix,
              receptive_field_dims=receptive_field_dims,
              resnet_activation=resnet_activation,
              l2_weight=l2_weight,
              use_weight_norm=use_weight_norm,
              use_data_init=use_data_init,
              dtype=dtype,
          )
  
          image_input_shape = tensorshape_util.concatenate(
              [None], image_shape
          )
          if conditional_shape is None:
              input_shape = image_input_shape
          else:
              conditional_input_shape = tensorshape_util.concatenate(
                  [None], conditional_shape
              )
              input_shape = [image_input_shape, conditional_input_shape]
  
          self.image_shape = image_shape
          self.conditional_shape = conditional_shape
          self.network.build(input_shape)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import numpy
  import warnings
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector
  from tensorflow_probability.python.distributions import categorical
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import logistic
  from tensorflow_probability.python.distributions import mixture_same_family
  from tensorflow_probability.python.distributions import quantized_distribution
  from tensorflow_probability.python.distributions import transformed_distribution
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.internal import tensorshape_util
label_desc: Use image node_id 1 to create a new PixelCNN object from inherited base classes: distribution with example: obj = PixelCNN(image_shape, conditional_shape, num_resnet, num_hierarchies, num_filters, num_logistic_mix, receptive_field_dims, dropout_p, resnet_activation, l2_weight, use_weight_norm, use_data_init, high, low, dtype, name)