parameters: (self)
return_statement: return converter.convert()
docstring: Overwrites TFLoader._mil_program_from_tf_ssa()
docstring_summary: Overwrites TFLoader._mil_program_from_tf_ssa()
docstring_tokens: Overwrites TFLoader . _mil_program_from_tf_ssa ()
function: 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,
              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:
                      logging.exception('Exception in pass "{}": {}'.format(tf_pass, e))
                      logging.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(self._tf_ssa, **self.kwargs)
          return converter.convert()
function_tokens: def _program_from_tf_ssa ( self ) : # 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 , 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 : logging . exception ( 'Exception in pass "{}": {}' . format ( tf_pass , e ) ) logging . 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 ( self . _tf_ssa , * * self . kwargs ) return converter . convert ( )