code: def eval():
      with tf.Graph().as_default() as g:
          noise = tf.random.normal(
              mean=0.0, stddev=1.0, shape=(50, NOISE_DIM)
          )
          step = tf.train.get_or_create_global_step()
          with tf.variable_scope("Generator"):
              one_hot = tf.one_hot(
                  tf.concat([tf.range(0, 10)] * 5, axis=0), 10
              )
              fake_img = conditional_generator(
                  (noise, one_hot), is_training=False
              )
              fake_img = (fake_img * 128.0) + 128.0
              fake_img = tf.cast(fake_img, tf.uint8)
              tiled = tfgan.eval.image_grid(
                  fake_img,
                  grid_shape=(5, 10),
                  image_shape=(28, 28),
                  num_channels=1,
              )
          with tf.Session() as sess:
              sess.run(tf.global_variables_initializer())
              saver = tf.train.Saver()
              ckpt = tf.train.latest_checkpoint(MODEL_DIR)
              saver.restore(sess, ckpt)
              outputs, step_value = sess.run([tiled, step])
              plt.imsave(
                  "./image_{}.png".format(step_value),
                  np.squeeze(outputs),
                  cmap="gray",
              )
  
file_path: analytics-zoo/pyzoo/zoo/examples/tensorflow/tfpark/gan/gan_train_and_evaluate.py
imports: from bigdl.optim.optimizer import MaxIteration
  from zoo.tfpark.gan.gan_estimator import GANEstimator
  from zoo import init_nncontext
  from zoo.tfpark import TFDataset
  from zoo.tfpark import ZooOptimizer
  import numpy
  import matplotlib.pyplot
  from tensorflow_gan.examples.mnist.networks import *
  from tensorflow_gan.python.losses.losses_impl import *
  import tensorflow_datasets
label_desc: Use image node_id 1 for calling a global function with example usage: eval() without return types