class_docstr: Base class for inference runner.
  
  Note:
      1. InferenceRunner will use `input.size()` to determine
         how much iterations to run, so you're responsible to ensure that
         `input.size()` is accurate.
      2. Only works with instances of `TowerTrainer`.
code: def _before_train(self):
      self._hooked_sess = HookedSession(self.trainer.sess, self._hooks)
      self._input_callbacks.before_train()
      if self._size > 0:
          logger.info(
              "[InferenceRunner] Will eval {} iterations".format(
                  self._size
              )
          )
      else:
          logger.warn(
              "[InferenceRunner] Got an InputSource with unknown size! Will iterate until OutOfRangeError!"
          )
  
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 InferenceRunnerBase obj's underlying member method code with example usage: obj._before_train() without return types