code: def main():
      model_name = "model-dcgan"
  
      root = "../utils/resources/models/tensorflow1/"
  
      if not os.path.isdir(root):
          os.mkdir(root)
  
      model_path = root
  
      # STEP 0
      logging.info("Loading a Dataset")
      (x_train_original, y_train_original), (_, _), _, _ = load_mnist()
  
      batch_size = 100
  
      (x_train, _) = (
          x_train_original[:batch_size],
          y_train_original[:batch_size],
      )
  
      lr = 0.0002
      latent_enc_len = 100
  
      (
          gen_tf,
          z_ph,
          gen_loss,
          gen_opt_tf,
          disc_loss_tf,
          disc_opt_tf,
          x_ph,
      ) = build_gan_graph(lr, latent_enc_len, batch_size)
      (
          enc_tf,
          image_to_enc_ph,
          latent_enc_loss,
          enc_opt,
      ) = build_inverse_gan_graph(lr, gen_tf, z_ph, latent_enc_len)
  
      sess = tf.Session()
      sess.run(tf.global_variables_initializer())
  
      train_models(
          sess,
          x_train,
          gen_loss,
          gen_opt_tf,
          disc_loss_tf,
          disc_opt_tf,
          x_ph,
          z_ph,
          latent_enc_loss,
          enc_opt,
      )
  
      saver = tf.train.Saver()
      saver.save(sess, os.path.join(model_path, model_name))
  
      sess.close()
  
file_path: adversarial-robustness-toolbox/utils/resources/create_inverse_gan_models.py
imports: import logging
  import time
  import os
  import numpy
  import tensorflow
  from art.utils import load_mnist
label_desc: Use image node_id 9 for calling a global function with example usage: main() without return types