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`.
docstr: Args:
      hook (tf.train.SessionRunHook):
docstr_tok: ["Args",":","hook","(","tf.train.SessionRunHook",")",":"]
code: def register_hook(self, hook):
      """
      Args:
          hook (tf.train.SessionRunHook):
      """
      self._hooks.append(hook)
  
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 2 for calling the InferenceRunnerBase obj's underlying member method code with example usage: obj.register_hook(hook) without return types