class_docstr: A predictor built from a given config.
  A single-tower model will be built without any prefix.
  
  Example:
  
  .. code-block:: python
  
      config = PredictConfig(model=my_model,
                             inputs_names=['image'],
                             # use names of tensors defined in the model
                             output_names=['linear/output', 'prediction'])
      predictor = OfflinePredictor(config)
      image = np.random.rand(1, 100, 100, 3)  # the shape of "image" defined in the model
      linear_output, prediction = predictor(image)
docstr: Args:
      config (PredictConfig): the config to use.
docstr_tok: ["Args",":","config","(","PredictConfig",")",":","the","config","to","use","."]
code: def __init__(self, config):
      """
      Args:
          config (PredictConfig): the config to use.
      """
      self.graph = config._maybe_create_graph()
      with self.graph.as_default():
          input = PlaceholderInput()
          input.setup(config.input_signature)
          with PredictTowerContext(""):
              config.tower_func(*input.get_input_tensors())
  
          input_tensors = get_tensors_by_names(config.input_names)
          output_tensors = get_tensors_by_names(config.output_names)
  
          config.session_init._setup_graph()
          sess = config.session_creator.create_session()
          config.session_init._run_init(sess)
          super(OfflinePredictor, self).__init__(
              input_tensors, output_tensors, config.return_input, sess
          )
  
imports: from abc import ABCMeta, abstractmethod
  import six
  import tensorflow
  from ..input_source import PlaceholderInput
  from ..tfutils.common import get_tensors_by_names, get_op_tensor_name
  from ..tfutils.tower import PredictTowerContext
label_desc: Use image node_id 1 to create a new OfflinePredictor object from inherited base classes: OnlinePredictor with example: obj = OfflinePredictor(config)