class_docstr: A driver for running eval inference.
  
  Attributes:
    model_name: str. Model name to eval.
    batch_size: int. Eval batch size.
    num_classes: int. Number of classes, default to 1000 for ImageNet.
    image_size: int. Input image size, determined by model name.
class_docstr_tok: ["A","driver","for","running","eval","inference",".","Attributes",":","model_name",":","str",".","Model","name","to","eval",".","batch_size",":","int",".","Eval","batch","size",".","num_classes",":","int",".","Number","of","classes",",","default","to","1000","for","ImageNet",".","image_size",":","int",".","Input","image","size",",","determined","by","model","name","."]
docstr: Build and run inference on the target images and labels.
docstr_tok: ["Build","and","run","inference","on","the","target","images","and","labels","."]
code: def run_inference(self, ckpt_dir, image_files, labels):
      """Build and run inference on the target images and labels."""
      with tf.Graph().as_default(), tf.Session() as sess:
          images, labels = self.build_dataset(
              image_files, labels, False
          )
          probs = self.build_model(images, is_training=False)
  
          sess.run(tf.global_variables_initializer())
          self.restore_model(sess, ckpt_dir)
  
          prediction_idx = []
          prediction_prob = []
          for _ in range(len(image_files) // self.batch_size):
              out_probs = sess.run(probs)
              idx = np.argsort(out_probs)[::-1]
              prediction_idx.append(idx[:5])
              prediction_prob.append(
                  [out_probs[pid] for pid in idx[:5]]
              )
  
          # Return the top 5 predictions (idx and prob) for each image.
          return prediction_idx, prediction_prob
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import json
  import sys
  from absl import app
  from absl import flags
  import numpy
  import tensorflow
  import efficientnet_builder
  import preprocessing
label_desc: Use image node_id 5 for calling the EvalCkptDriver obj's underlying member method code with example usage: obj.run_inference(ckpt_dir, image_files, labels) and returns: prediction_idx,  prediction_prob