class_docstr: GAN Discriminator.
  A network to differentiate between generated and real handwritten digits.
class_docstr_tok: ["GAN","Discriminator",".","A","network","to","differentiate","between","generated","and","real","handwritten","digits","."]
docstr: Creates a model for discriminating between real and generated digits.
  Args:
    data_format: Either 'channels_first' or 'channels_last'.
      'channels_first' is typically faster on GPUs while 'channels_last' is
      typically faster on CPUs. See
      https://www.tensorflow.org/performance/performance_guide#data_formats
docstr_tok: ["Creates","a","model","for","discriminating","between","real","and","generated","digits",".","Args",":","data_format",":","Either","'channels_first","'","or","'channels_last","'",".","'channels_first","'","is","typically","faster","on","GPUs","while","'channels_last","'","is","typically","faster","on","CPUs",".","See","https",":","\/\/www.tensorflow.org\/performance\/performance_guide","#","data_formats"]
code: def __init__(self, data_format):
      """Creates a model for discriminating between real and generated digits.
      Args:
        data_format: Either 'channels_first' or 'channels_last'.
          'channels_first' is typically faster on GPUs while 'channels_last' is
          typically faster on CPUs. See
          https://www.tensorflow.org/performance/performance_guide#data_formats
      """
      super(Discriminator, self).__init__(name="")
      if data_format == "channels_first":
          self._input_shape = [-1, 1, 28, 28]
      else:
          assert data_format == "channels_last"
          self._input_shape = [-1, 28, 28, 1]
      self.conv1 = layers.Conv2D(
          64,
          5,
          padding="SAME",
          data_format=data_format,
          activation=tf.tanh,
      )
      self.pool1 = layers.AveragePooling2D(
          2, 2, data_format=data_format
      )
      self.conv2 = layers.Conv2D(
          128, 5, data_format=data_format, activation=tf.tanh
      )
      self.pool2 = layers.AveragePooling2D(
          2, 2, data_format=data_format
      )
      self.flatten = layers.Flatten()
      self.fc1 = layers.Dense(1024, activation=tf.tanh)
      self.fc2 = layers.Dense(1, activation=None)
  
imports: from __future__ import absolute_import, division, print_function
  import argparse
  import os
  import sys
  import time
  from tempfile import gettempdir
  import tensorflow
  from tensorflow.examples.tutorials.mnist import input_data
  from clearml import Task
label_desc: Use image node_id 1 to create a new Discriminator object from inherited base classes: tf.keras with example: obj = Discriminator(data_format)