(self)
return self.output_graph
Applies node renames in self.final_node_renames to self.output_graph.
Applies node renames in self.final_node_renames to self.output_graph.
Applies node renames in self . final_node_renames to self . output_graph .
def apply_final_node_renames(self):
    """Applies node renames in self.final_node_renames to self.output_graph."""
    old_graph = self.output_graph
    self.output_graph = graph_pb2.GraphDef()
    for node in old_graph.node:
      node.name = self.final_node_renames.get(node.name, node.name)
      for index, input_name in enumerate(node.input):
        node_name = node_name_from_input(input_name)
        input_full_name = ensure_tensor_name_has_port(input_name)
        if node_name in self.final_node_renames:
          node.input[index] = "%s%s" % (self.final_node_renames[node_name],
                                        input_full_name[len(node_name):])
      self.add_output_graph_node(node)
    return self.output_graph
def apply_final_node_renames ( self ) : old_graph = self . output_graph self . output_graph = graph_pb2 . GraphDef ( ) for node in old_graph . node : node . name = self . final_node_renames . get ( node . name , node . name ) for index , input_name in enumerate ( node . input ) : node_name = node_name_from_input ( input_name ) input_full_name = ensure_tensor_name_has_port ( input_name ) if node_name in self . final_node_renames : node . input [ index ] = "%s%s" % ( self . final_node_renames [ node_name ] , input_full_name [ len ( node_name ) : ] ) self . add_output_graph_node ( node ) return self . output_graph