class_docstr: A driver for running eval inference.
  
  Attributes:
    model_name: str. Model name to eval.
    batch_size: int. Eval batch size.
    image_size: int. Input image size, determined by model name.
    num_classes: int. Number of classes, default to 1000 for ImageNet.
    include_background_label: whether to include extra background label.
class_docstr_tok: ["A","driver","for","running","eval","inference",".","Attributes",":","model_name",":","str",".","Model","name","to","eval",".","batch_size",":","int",".","Eval","batch","size",".","image_size",":","int",".","Input","image","size",",","determined","by","model","name",".","num_classes",":","int",".","Number","of","classes",",","default","to","1000","for","ImageNet",".","include_background_label",":","whether","to","include","extra","background","label","."]
docstr: Eval a list of example images.
  
  Args:
    ckpt_dir: str. Checkpoint directory path.
    image_files: List[str]. A list of image file paths.
    labels_map_file: str. The labels map file path.
    enable_ema: enable expotential moving average.
    export_ckpt: export ckpt folder.
  
  Returns:
    A tuple (pred_idx, and pred_prob), where pred_idx is the top 5 prediction
    index and pred_prob is the top 5 prediction probability.
docstr_tok: ["Eval","a","list","of","example","images",".","Args",":","ckpt_dir",":","str",".","Checkpoint","directory","path",".","image_files",":","List","[","str","]",".","A","list","of","image","file","paths",".","labels_map_file",":","str",".","The","labels","map","file","path",".","enable_ema",":","enable","expotential","moving","average",".","export_ckpt",":","export","ckpt","folder",".","Returns",":","A","tuple","(","pred_idx",",","and","pred_prob",")",",","where","pred_idx","is","the","top","5","prediction","index","and","pred_prob","is","the","top","5","prediction","probability","."]
code: def eval_example_images(
      self,
      ckpt_dir,
      image_files,
      labels_map_file,
      enable_ema=True,
      export_ckpt=None,
  ):
      """Eval a list of example images.
  
      Args:
        ckpt_dir: str. Checkpoint directory path.
        image_files: List[str]. A list of image file paths.
        labels_map_file: str. The labels map file path.
        enable_ema: enable expotential moving average.
        export_ckpt: export ckpt folder.
  
      Returns:
        A tuple (pred_idx, and pred_prob), where pred_idx is the top 5 prediction
        index and pred_prob is the top 5 prediction probability.
      """
      classes = json.loads(tf.gfile.Open(labels_map_file).read())
      pred_idx, pred_prob = self.run_inference(
          ckpt_dir,
          image_files,
          [0] * len(image_files),
          enable_ema,
          export_ckpt,
      )
      for i in range(len(image_files)):
          print("predicted class for image {}: ".format(image_files[i]))
          for j, idx in enumerate(pred_idx[i]):
              print(
                  "  -> top_{} ({:4.2f}%): {}  ".format(
                      j, pred_prob[i][j] * 100, classes[str(idx)]
                  )
              )
      return pred_idx, pred_prob
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import json
  import os
  import sys
  from absl import logging
  import numpy
  import tensorflow.compat.v1
  from tensorflow.python.tpu import tpu_function
label_desc: Use image node_id 7 for calling the EvalCkptDriver obj's underlying member method code with example usage: obj.eval_example_images(ckpt_dir, image_files, labels_map_file, enable_ema, export_ckpt) and returns: pred_idx,  pred_prob