docstr: Apply conditional dependencies to the channels.
docstr_tok: ["Apply","conditional","dependencies","to","the","channels","."]
code: def _apply_channel_conditioning(
      self,
      dist,
      image_input,
      component_logits,
      locs,
      scales,
      coeffs=None,
  ):
      """Apply conditional dependencies to the channels."""
      num_channels = dist.event_shape[-1]
      num_coeffs = num_channels * (num_channels - 1) // 2
      loc_tensors = tf.split(locs, num_channels, axis=-1)
      coef_tensors = tf.split(coeffs, num_coeffs, axis=-1)
      channel_tensors = tf.split(image_input, num_channels, axis=-1)
  
      coef_count = 0
      for i in range(num_channels):
          channel_tensors[i] = tf.expand_dims(
              channel_tensors[i], axis=-2
          )
          for j in range(i):
              loc_tensors[i] += (
                  channel_tensors[j] * coef_tensors[coef_count]
              )
              coef_count += 1
      return [component_logits, tf.concat(loc_tensors, axis=-1), scales]
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import pixel_cnn
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.internal import tf_keras
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 9 for calling the PixelCnnTest obj's underlying member method code with example usage: obj._apply_channel_conditioning(dist, image_input, component_logits, locs, scales, coeffs) and returns: list