class_docstr: Evaluator.
  
  A class used for performing predictions and evaluate a model performance.
  
  Arguments:
      tensors: list of `Tensor`. A list of tensors to perform predictions.
      model: `str`. The model weights path (Optional).
      session: `Session`. The session to run the prediction (Optional).
class_docstr_tok: ["Evaluator",".","A","class","used","for","performing","predictions","and","evaluate","a","model","performance",".","Arguments",":","tensors",":","list","of","`","Tensor","`",".","A","list","of","tensors","to","perform","predictions",".","model",":","`","str","`",".","The","model","weights","path","(","Optional",")",".","session",":","`","Session","`",".","The","session","to","run","the","prediction","(","Optional",")","."]
docstr: predict.
  
  Run data through the provided network and return the result value.
  
  Arguments:
      feed_dict: `dict`. Feed data dictionary, with placeholders as
          keys, and data as values.
  
  Returns:
      An `array`. In case of multiple tensors to predict, each tensor's
      prediction result is concatenated.
docstr_tok: ["predict",".","Run","data","through","the","provided","network","and","return","the","result","value",".","Arguments",":","feed_dict",":","`","dict","`",".","Feed","data","dictionary",",","with","placeholders","as","keys",",","and","data","as","values",".","Returns",":","An","`","array","`",".","In","case","of","multiple","tensors","to","predict",",","each","tensor's","prediction","result","is","concatenated","."]
code: def predict(self, feed_dict):
      """predict.
  
      Run data through the provided network and return the result value.
  
      Arguments:
          feed_dict: `dict`. Feed data dictionary, with placeholders as
              keys, and data as values.
  
      Returns:
          An `array`. In case of multiple tensors to predict, each tensor's
          prediction result is concatenated.
  
      """
      with self.graph.as_default():
          # Data Preprocessing
          dprep_dict = dict()
          for i in range(len(self.inputs)):
              # Support for custom inputs not using dprep/daug
              if len(self.dprep_collection) > i:
                  if self.dprep_collection[i] is not None:
                      dprep_dict[
                          self.inputs[i]
                      ] = self.dprep_collection[i]
          # Apply pre-processing
          if len(dprep_dict) > 0:
              for k in dprep_dict:
                  feed_dict[k] = dprep_dict[k].apply(feed_dict[k])
  
          # Prediction for each tensor
          tflearn.is_training(False, self.session)
          prediction = []
          if len(self.tensors) == 1:
              return self.session.run(
                  self.tensors[0], feed_dict=feed_dict
              )
          else:
              for output in self.tensors:
                  o_pred = self.session.run(
                      output, feed_dict=feed_dict
                  ).tolist()
                  for i, val in enumerate(
                      o_pred
                  ):  # Reshape pred per sample
                      if len(self.tensors) > 1:
                          if not len(prediction) > i:
                              prediction.append([])
                          prediction[i].append(val)
              return prediction
  
file_path: tflearn/tflearn/helpers/evaluator.py
imports: from __future__ import division, print_function, absolute_import
  import tensorflow.compat.v1
  import tflearn
  from ..utils import to_list
  from ..None import data_flow
  from ..None import metrics
  from .trainer import evaluate_flow
label_desc: Use image node_id 2 for calling the Evaluator obj's underlying member method code with example usage: obj.predict(feed_dict) and returns: self, prediction