code: def main(argv=None):
      if not FLAGS.dataset_dir:
          raise ValueError("You must supply the dataset directory.")
  
      tf.logging.set_verbosity(tf.logging.INFO)
  
      classifier = tf.estimator.Estimator(
          model_fn=model_fn, model_dir=FLAGS.checkpoint_path
      )
  
      if FLAGS.steps is None:
          FLAGS.steps = 50000 // FLAGS.batch_size
  
      results = classifier.evaluate(
          input_fn=input_fn,
          steps=FLAGS.steps,
          hooks=[hook(every_n_steps=FLAGS.log_every_n_steps)],
      )
  
      print(
          "| {:5d} Samples    | Top-1       | Top-5       | MAC    | Size   |".format(
              FLAGS.batch_size * FLAGS.steps
          )
      )
      print(
          "|------------------|-------------|-------------|--------|--------|"
      )
      for i, model_name in enumerate(FLAGS.model_name.split(",")):
          print(
              "| {:16s} | {:6.3f}      | {:6.3f}      | {:5.1f}M | {:5.1f}M |".format(
                  model_name.split("Net")[-1]
                  if len(model_name) > 16
                  else model_name,
                  100 * (results["%dTop1" % i]),
                  100 * (results["%dTop5" % i]),
                  results["%dMAC" % i] / 10e5,
                  results["%dSize" % i] / 10e5,
              )
          )
  
file_path: tensornets/examples/evaluate_imagenet.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import sys
  import tensorflow.compat.v1
  import tensornets
  from imagenet_preprocessing import input_fn
  from tensorflow import contrib
label_desc: Use image node_id 3 for calling a global function with example usage: main(argv) without return types