parameters: (graph: Graph, outputs: list, add_edge: callable, params: dict = {})
docstring: Adds identity nodes marked with needs_removal=True attribute after each output of the graph.
      These nodes are used for storing tensor names information at the incoming edge
      and are removed with the OutputCut transformation.
      :param graph: graph to operate on.
      :param outputs: list of output node ids.
      :param add_edge: method which adds an edge to the graph with the following signature:
       f(src_node_id: str, dst_node_id: str, in_port: int).
      :param params: extra parameters for add_edge method.
docstring_summary: Adds identity nodes marked with needs_removal=True attribute after each output of the graph.
      These nodes are used for storing tensor names information at the incoming edge
      and are removed with the OutputCut transformation.
      :param graph: graph to operate on.
      :param outputs: list of output node ids.
      :param add_edge: method which adds an edge to the graph with the following signature:
       f(src_node_id: str, dst_node_id: str, in_port: int).
      :param params: extra parameters for add_edge method.
docstring_tokens: Adds identity nodes marked with needs_removal = True attribute after each output of the graph . These nodes are used for storing tensor names information at the incoming edge and are removed with the OutputCut transformation . : param graph : graph to operate on . : param outputs : list of output node ids . : param add_edge : method which adds an edge to the graph with the following signature : f ( src_node_id : str dst_node_id : str in_port : int ) . : param params : extra parameters for add_edge method .
function: def add_outputs_identity(graph: Graph, outputs: list, add_edge: callable, params: dict = {}):
      """
      Adds identity nodes marked with needs_removal=True attribute after each output of the graph.
      These nodes are used for storing tensor names information at the incoming edge
      and are removed with the OutputCut transformation.
      :param graph: graph to operate on.
      :param outputs: list of output node ids.
      :param add_edge: method which adds an edge to the graph with the following signature:
       f(src_node_id: str, dst_node_id: str, in_port: int).
      :param params: extra parameters for add_edge method.
      """
      for output in outputs:
          fake_node_name = graph.unique_id(output)
          graph.add_node(fake_node_name, name=fake_node_name, identity=True, kind='op', op='Identity',
                         infer=None, needs_removal=True, symbol_dict={'op': 'Identity'})
          add_edge(graph, output, fake_node_name, **params)
function_tokens: def add_outputs_identity ( graph : Graph , outputs : list , add_edge : callable , params : dict = { } ) : for output in outputs : fake_node_name = graph . unique_id ( output ) graph . add_node ( fake_node_name , name = fake_node_name , identity = True , kind = 'op' , op = 'Identity' , infer = None , needs_removal = True , symbol_dict = { 'op' : 'Identity' } ) add_edge ( graph , output , fake_node_name , * * params )