code: def discriminator_fn_specgram(images, **kwargs):
      """Builds discriminator network."""
      shape = images.shape
      normalizer = data_normalizer.registry[kwargs["data_normalizer"]](
          kwargs
      )
      images = normalizer.normalize_op(images)
      images.set_shape(shape)
      logits, end_points = networks.discriminator(
          images,
          kwargs["progress"],
          lambda block_id: _num_filters_fn(
              block_id, **kwargs
          ),  # pylint:disable=unnecessary-lambda
          kwargs["resolution_schedule"],
          num_blocks=kwargs["num_blocks"],
          kernel_size=kwargs["kernel_size"],
          simple_arch=kwargs["simple_arch"],
      )
      with tf.variable_scope("discriminator_cond"):
          x = tf.layers.flatten(end_points["last_conv"])
          end_points["classification_logits"] = layers.custom_dense(
              x=x,
              units=kwargs["num_tokens"],
              scope="classification_logits",
          )
      return logits, end_points
  
file_path: magenta/magenta/models/gansynth/lib/network_functions.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from magenta.models.gansynth.lib import data_normalizer
  from magenta.models.gansynth.lib import layers
  from magenta.models.gansynth.lib import networks
  import tensorflow.compat.v1
label_desc: Use image node_id 3 for calling a global function with example usage: discriminator_fn_specgram(images) and returns: logits,  end_points