class_docstr: HiFiC Model class.
class_docstr_tok: ["HiFiC","Model","class","."]
docstr: Get discriminator outputs.
docstr_tok: ["Get","discriminator","outputs","."]
code: def _compute_discriminator_out(
      self, nodes: Nodes, create_summaries, gradients_to_generator=True
  ) -> archs.DiscOutSplit:
      """Get discriminator outputs."""
      with tf.name_scope("disc"):
          input_image = nodes.input_image_scaled
          reconstruction = nodes.reconstruction_scaled
  
          if not gradients_to_generator:
              reconstruction = tf.stop_gradient(reconstruction)
  
          discriminator_in = tf.concat(
              [input_image, reconstruction], axis=0
          )
  
          # Condition D.
          latent = tf.stop_gradient(nodes.latent_quantized)
          latent = tf.concat([latent, latent], axis=0)
  
          discriminator_in = (discriminator_in, latent)
  
          disc_out_all = self._discriminator(
              discriminator_in, training=self.training
          )
  
      d_real, d_fake = tf.split(disc_out_all.d_all, 2)
      d_real_logits, d_fake_logits = tf.split(
          disc_out_all.d_all_logits, 2
      )
      disc_out_split = archs.DiscOutSplit(
          d_real, d_fake, d_real_logits, d_fake_logits
      )
  
      if create_summaries:
          tf.summary.scalar(
              "d_real", tf.reduce_mean(disc_out_split.d_real)
          )
          tf.summary.scalar(
              "d_fake", tf.reduce_mean(disc_out_split.d_fake)
          )
  
      return disc_out_split
  
imports: import collections
  import glob
  import itertools
  from compare_gan.gans import loss_lib
  import tensorflow.compat.v1
  import tensorflow_datasets
  from hific import archs
  from hific import helpers
  from hific.helpers import ModelMode
  from hific.helpers import ModelType
  from hific.helpers import TFDSArguments
label_desc: Use image node_id 27 for calling the HiFiC obj's underlying member method code with example usage: obj._compute_discriminator_out(nodes, create_summaries, gradients_to_generator) and returns: disc_out_split