class_docstr: Abstract class for TensorFlow model loader.
class_docstr_tok: ["Abstract","class","for","TensorFlow","model","loader","."]
docstr: Load TensorFlow model into MIL program.
docstr_tok: ["Load","TensorFlow","model","into","MIL","program","."]
code: def load(self):
      """Load TensorFlow model into MIL program."""
  
      logger.info("Loading TensorFlow model '{}'".format(self.model))
      outputs = self.kwargs.get("outputs", None)
      output_names = get_output_names(outputs)
      self._graph_def = self._graph_def_from_model(output_names)
  
      if self._graph_def is not None and len(self._graph_def.node) == 0:
          msg = "tf.Graph should have at least 1 node, Got empty graph."
          raise ValueError(msg)
  
      self._tf_ssa = self._tf_ssa_from_graph_def()
  
      del self._graph_def
      gc.collect()
  
      if self.debug:
          import graphviz
  
          dot_string = self._tf_ssa.get_dot_string(
              annotation=True,
              name_and_op_style=True,
              highlight_debug_nodes=[],
          )
          graphviz.Source(dot_string).view(
              filename="/tmp/ssa_before_tf_passes", cleanup=True
          )
  
      program = self._program_from_tf_ssa()
      logger.debug("program:\n{}".format(program))
      return program
  
imports: import gc
  import os
  from distutils.version import StrictVersion
  from tempfile import mktemp
  import tensorflow
  from tqdm import tqdm
  from coremltools import _logger
  from coremltools._deps import _get_version
  from coremltools.converters._profile_utils import _profile
  from .._utils import get_output_names
  from .basic_graph_ops import fill_outputs
  from .converter import TFConverter
  from .parsed_tf_node import ParsedTFNode
  from .tf_graph_pass import cond_to_where, constant_propagation, delete_asserts, delete_disconnected_nodes, delete_unnecessary_constant_nodes, functionalize_loops, fuse_dilation_conv, insert_get_tuple, quantization_pass, remove_variable_nodes, tensor_array_resource_removal
  from .tfssa import NetworkEnsemble, SSAFunction
label_desc: Use image node_id 2 for calling the TFLoader obj's underlying member method code with example usage: obj.load() and returns: program