class_docstr: Generator of handwritten digits similar to the ones in the MNIST dataset.
class_docstr_tok: ["Generator","of","handwritten","digits","similar","to","the","ones","in","the","MNIST","dataset","."]
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(Generator, self).__init__(name="")
      self.data_format = data_format
      # We are using 128 6x6 channels as input to the first deconvolution layer
      if data_format == "channels_first":
          self._pre_conv_shape = [-1, 128, 6, 6]
      else:
          assert data_format == "channels_last"
          self._pre_conv_shape = [-1, 6, 6, 128]
      self.fc1 = layers.Dense(6 * 6 * 128, activation=tf.tanh)
  
      # In call(), we reshape the output of fc1 to _pre_conv_shape
  
      # Deconvolution layer. Resulting image shape: (batch, 14, 14, 64)
      self.conv1 = layers.Conv2DTranspose(
          64, 4, strides=2, activation=None, data_format=data_format
      )
  
      # Deconvolution layer. Resulting image shape: (batch, 28, 28, 1)
      self.conv2 = layers.Conv2DTranspose(
          1,
          2,
          strides=2,
          activation=tf.nn.sigmoid,
          data_format=data_format,
      )
  
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 Generator object from inherited base classes: tf.keras with example: obj = Generator(data_format)