class_docstr: A callback that runs a list of :class:`Inferencer` on some :class:`InputSource`.
code: def _setup_graph(self):
      if self._tower_func is None:
          assert (
              self.trainer.tower_func is not None
          ), "You must set tower_func of the trainer to use InferenceRunner!"
          self._tower_func = self.trainer.tower_func
      input_callbacks = self._input_source.setup(
          self._tower_func.input_signature
      )
  
      vs_name = self.trainer._vs_name_for_predictor(self._device_id)
      logger.info(
          "[InferenceRunner] Building tower '{}' on device {} {}...".format(
              self._tower_name,
              self._device,
              "with variable scope '{}'".format(vs_name)
              if vs_name
              else "",
          )
      )
      with tf.variable_scope(
          tf.get_variable_scope(), reuse=True
      ), tf.device(self._device), PredictTowerContext(
          self._tower_name, vs_name=vs_name
      ):
          self._tower_func(*self._input_source.get_input_tensors())
          self._tower_handle = self._tower_func.towers[-1]
  
      for h in [self._build_hook(inf) for inf in self.infs]:
          self.register_hook(h)
      # trigger_{step,epoch}, {before,after}_epoch is ignored.
      # We assume that InputSource callbacks won't use these methods
      self._input_callbacks = Callbacks(input_callbacks)
      for h in self._input_callbacks.get_hooks():
          self.register_hook(h)
  
      for inf in self.infs:
          inf.setup_graph(self.trainer)
      self._input_callbacks.setup_graph(self.trainer)
  
imports: import itertools
  import sys
  from contextlib import contextmanager
  import tqdm
  from tensorflow.python.training.monitored_session import _HookedSession
  from ..compat import tfv1
  from ..dataflow.base import DataFlow
  from ..input_source import FeedInput, InputSource, QueueInput, StagingInput
  from ..tfutils.tower import PredictTowerContext
  from ..utils import logger
  from ..utils.utils import get_tqdm_kwargs
  from .base import Callback
  from .group import Callbacks
  from .inference import Inferencer
label_desc: Use image node_id 3 for calling the InferenceRunner obj's underlying member method code with example usage: obj._setup_graph() without return types