def __init__(self, input_tensors, output_tensors,
                 return_input=False, sess=None):
        """
        Args:
            input_tensors (list): list of names.
            output_tensors (list): list of names.
            return_input (bool): same as :attr:`PredictorBase.return_input`.
            sess (tf.Session): the session this predictor runs in. If None,
                will use the default session at the first call.
                Note that in TensorFlow, default session is thread-local.
        """
        def normalize_name(t):
            if isinstance(t, six.string_types):
                return get_op_tensor_name(t)[1]
            return t

        self.return_input = return_input
        self.input_tensors = [normalize_name(x) for x in input_tensors]
        self.output_tensors = [normalize_name(x) for x in output_tensors]
        self.sess = sess

        if sess is not None:
            self._callable = sess.make_callable(
                fetches=output_tensors,
                feed_list=input_tensors,
                accept_options=self.ACCEPT_OPTIONS)
        else:
            self._callable = None

        Args:
            input_tensors (list): list of names.
            output_tensors (list): list of names.
            return_input (bool): same as :attr:`PredictorBase.return_input`.
            sess (tf.Session): the session this predictor runs in. If None,
                will use the default session at the first call.
                Note that in TensorFlow, default session is thread-local.
        
tensorpack/predict/base.py