docstr: Overwrites TFLoader._mil_program_from_tf_ssa()
docstr_tok: ["Overwrites","TFLoader._mil_program_from_tf_ssa","(",")"]
code: def _program_from_tf_ssa(self):
      """Overwrites TFLoader._mil_program_from_tf_ssa()"""
      # Applying frontend passes on TFSSA. Note that these are different from
      # passes applied to MIL in TF frontend.
      tf_passes = [
          delete_asserts,
          functionalize_loops,
          constant_propagation,
          delete_unnecessary_constant_nodes,  # must come after constant_propagation
          quantization_pass,
          cond_to_where,
          remove_variable_nodes,
          fuse_dilation_conv,
      ]
  
      if self.debug:
          for tf_pass in _tqdm(
              tf_passes,
              desc="Running TensorFlow Graph Passes",
              unit=" passes",
          ):
              try:
                  tf_pass(self._tf_ssa)
              except Exception as e:
                  logger.exception(
                      'Exception in pass "{}": {}'.format(tf_pass, e)
                  )
                  logger.info(
                      "Ignoring exception and continuing to next pass"
                  )
      else:
          for tf_pass in _tqdm(
              tf_passes,
              desc="Running TensorFlow Graph Passes",
              unit=" passes",
          ):
              tf_pass(self._tf_ssa)
  
      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_after_tf_passes", cleanup=True
          )
      converter = TFConverter(
          tfssa=self._tf_ssa,
          inputs=self.kwargs["inputs"],
          outputs=self.kwargs["outputs"],
          opset_version=self.kwargs["specification_version"],
          use_default_fp16_io=self.kwargs["use_default_fp16_io"],
      )
      return converter.convert()
  
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 4 for calling the TF1Loader obj's underlying member method code with example usage: obj._program_from_tf_ssa() and returns: converter