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: Build input dataset.
docstr_tok: ["Build","input","dataset","."]
code: def build_dataset(self, filenames, labels, is_training):
      """Build input dataset."""
      batch_drop_remainder = False
      if "condconv" in self.model_name and not is_training:
          # CondConv layers can only be called with known batch dimension. Thus, we
          # must drop all remaining examples that do not make up one full batch.
          # To ensure all examples are evaluated, use a batch size that evenly
          # divides the number of files.
          batch_drop_remainder = True
          num_files = len(filenames)
          if num_files % self.batch_size != 0:
              tf.logging.warn(
                  "Remaining examples in last batch are not being "
                  "evaluated."
              )
      filenames = tf.constant(filenames)
      labels = tf.constant(labels)
      dataset = tf.data.Dataset.from_tensor_slices((filenames, labels))
  
      def _parse_function(filename, label):
          image_string = tf.read_file(filename)
          preprocess_fn = self.get_preprocess_fn()
          image_decoded = preprocess_fn(
              image_string, is_training, image_size=self.image_size
          )
          image = tf.cast(image_decoded, tf.float32)
          return image, label
  
      dataset = dataset.map(_parse_function)
      dataset = dataset.batch(
          self.batch_size, drop_remainder=batch_drop_remainder
      )
  
      iterator = dataset.make_one_shot_iterator()
      images, labels = iterator.get_next()
      return images, labels
  
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 5 for calling the EvalCkptDriver obj's underlying member method code with example usage: obj.build_dataset(filenames, labels, is_training) and returns: images,  labels, image,  label