code: def build(self):
      for w in self._graph.initializer:
          self._weights[w.name] = w
      for s in self._graph.input:
          self._inputs[s.name] = s
      for s in self._graph.output:
          self._outputs[s.name] = s
  
      for i, layer in enumerate(self._graph.node):
          if not layer.name:
              layer.name = "{0}_{1}".format(layer.op_type, i)
          name = layer.name
          # print(name)
          # print(layer.op_type)
          node = ONNXGraphNode(layer)
          self.layer_map[name] = node
          self.layer_name_map[name] = name
          for n in layer.input:
              if n in self._weights:
                  # n is input data
                  node.weights.append(n)
              if n in self._inputs:
                  node.inputs.append(n)
              else:
                  # n is input edge
                  self._edge_dst[n] = name
                  if n in self._edge_src:
                      self._make_connection(self._edge_src[n], name)
          for n in layer.output:
              if n in self._outputs:
                  node.outputs.append(n)
              else:
                  self._edge_src[n] = name
                  if n in self._edge_dst:
                      self._make_connection(name, self._edge_dst[n])
  
      super(ONNXGraph, self).build()
  
file_path: MMdnn/mmdnn/conversion/onnx/onnx_graph.py
imports: from mmdnn.conversion.common.DataStructure.graph import GraphNode, Graph
  from onnx import onnx_pb2
label_desc: Use image node_id 3 for calling the ONNXGraph obj's underlying member method code with example usage: obj.build() without return types