class_docstr: A Wrapper to handle tensorflow models parsing, TensorFlow is needed
  
  Parameters
  ----------
  model_dir : tensorflow frozen pb file or a directory that contains saved
  model or checkpoints.
  
  outputs : List of output tensor names (Optional)
      Optional output node names. This will be protected for saved model
      when we do remove training nodes.
  
  Examples
  --------
  .. code-block:: python
  
      parser = TFParser(model_dir)
      graphdef = parser.parse()
class_docstr_tok: ["A","Wrapper","to","handle","tensorflow","models","parsing",",","TensorFlow","is","needed","Parameters","--","--","--","--","--","model_dir",":","tensorflow","frozen","pb","file","or","a","directory","that","contains","saved","model","or","checkpoints",".","outputs",":","List","of","output","tensor","names","(","Optional",")","Optional","output","node","names",".","This","will","be","protected","for","saved","model","when","we","do","remove","training","nodes",".","Examples","--","--","--","--","..","code-block",":",":","python","parser","=","TFParser","(","model_dir",")","graphdef","=","parser.parse","(",")"]
docstr: Load the tensorflow saved model.
docstr_tok: ["Load","the","tensorflow","saved","model","."]
code: def _load_saved_model(self):
      """Load the tensorflow saved model."""
      try:
          from tensorflow.python.tools import freeze_graph
          from tensorflow.python.framework import ops
          from tensorflow.python.framework import graph_util
          from tensorflow.core.framework import graph_pb2
      except ImportError:
          raise ImportError(
              "InputConfiguration: Unable to import tensorflow which is "
              "required to restore from saved model."
          )
  
      saved_model_dir = self._model_dir
      output_graph_filename = self._tmp_dir.relpath(
          "tf_frozen_model.pb"
      )
      input_saved_model_dir = saved_model_dir
      output_node_names = self._get_output_names()
  
      input_binary = False
      input_saver_def_path = False
      restore_op_name = None
      filename_tensor_name = None
      clear_devices = True
      input_meta_graph = False
      checkpoint_path = None
      input_graph_filename = None
      saved_model_tags = ",".join(self._get_tag_set())
  
      freeze_graph.freeze_graph(
          input_graph_filename,
          input_saver_def_path,
          input_binary,
          checkpoint_path,
          output_node_names,
          restore_op_name,
          filename_tensor_name,
          output_graph_filename,
          clear_devices,
          "",
          "",
          "",
          input_meta_graph,
          input_saved_model_dir,
          saved_model_tags,
      )
  
      with ops.Graph().as_default():  # pylint: disable=not-context-manager
          output_graph_def = graph_pb2.GraphDef()
          with open(output_graph_filename, "rb") as f:
              output_graph_def.ParseFromString(f.read())
          output_graph_def = graph_util.remove_training_nodes(
              output_graph_def, protected_nodes=self._outputs
          )
          return output_graph_def
  
file_path: tvm/python/tvm/relay/frontend/tensorflow_parser.py
imports: import os
  from tvm.contrib import utils
label_desc: Use image node_id 7 for calling the TFParser obj's underlying member method code with example usage: obj._load_saved_model() and returns: output_graph_def