class_docstr: Takes onnx Constant nodes and puts the tensor into graph initializers instead.
class_docstr_tok: ["Takes","onnx","Constant","nodes","and","puts","the","tensor","into","graph","initializers","instead","."]
code: def __call__(self, graph):  # type: (Graph) -> Graph
      output_names = [str(output_[0]) for output_ in graph.outputs]
      remaining_nodes = []
      for node in graph.nodes:
          if node.op_type != "Constant" or node.name in output_names:
              remaining_nodes.append(node)
              continue
          for child in node.children:
              child.input_tensors[node.outputs[0]] = node.attrs["value"]
  
      graph.nodes = remaining_nodes
      return graph
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from typing import Sequence, Text, Dict, List
  import numpy
  from onnx import TensorProto
  from ._graph import Graph, Node
label_desc: Use image node_id 1 for calling the ConstantsToInitializers obj's underlying member method code with example usage: obj.__call__(graph) and returns: graph