parameters: (self, nodes, weights)
return_statement: return nodes
docstring: parse onnx
          :param nodes:
          :param weights:
          :return:
docstring_summary: parse onnx
          :param nodes:
          :param weights:
          :return:
docstring_tokens: parse onnx : param nodes : : param weights : : return :
function: def _parse_onnx_graph(self, nodes, weights):
          """
          parse onnx
          :param nodes:
          :param weights:
          :return:
          """
          # out2nodename = {i['name']:[] for i in nodes}
          #self._fix_self_output(nodes)
  
          for node in nodes.values():
              if node['type'] == 'Div':
                  parse_Div(node, weights, nodes)
  
          def all_search(graph, table):
              """
              search the graph
              :param graph:
              :param table:
              :return:
              """
              for onnx_node in graph.values():
                  if onnx_node['visited']:
                      continue
                  type_name = onnx_node['type']
                  if table.get(type_name) != None:
                      table[type_name](onnx_node, weights, graph)
  
          all_search(nodes, {'Conv': parse_Conv,
                             'Gemm': parse_Gemm,
                             'Mul': parse_Mul,
                             'BatchNormalization': parse_BatchNorm})
  
          all_search(nodes, {'Concat': parse_Concat})
  
          all_search(nodes, {'Add': parse_Add,
                             'Sum': parse_Sum,
                             'Transpose': parse_Transpose,
                             'LRN': parse_Lrn,
                             'Slice': parse_Slice,
                             'Softmax': parse_Softmax,
                             'Dropout': parse_Dropout,
                             'Relu': parse_Act,
                             'LeakyRelu': parse_Act,
                             'ImageScaler': parse_ImageScaler,
                             'MaxPool': parse_Pooling,
                             'GlobalAveragePool': parse_Pooling,
                             'AveragePool': parse_Pooling,
                             'Reshape': parse_Reshape})
          #nodes = rm_weight_node(nodes, weights)
          #print 'anakin_node: ', nodes
          return nodes
function_tokens: def _parse_onnx_graph ( self , nodes , weights ) : # out2nodename = {i['name']:[] for i in nodes} #self._fix_self_output(nodes) for node in nodes . values ( ) : if node [ 'type' ] == 'Div' : parse_Div ( node , weights , nodes ) def all_search ( graph , table ) : """
              search the graph
              :param graph:
              :param table:
              :return:
              """ for onnx_node in graph . values ( ) : if onnx_node [ 'visited' ] : continue type_name = onnx_node [ 'type' ] if table . get ( type_name ) != None : table [ type_name ] ( onnx_node , weights , graph ) all_search ( nodes , { 'Conv' : parse_Conv , 'Gemm' : parse_Gemm , 'Mul' : parse_Mul , 'BatchNormalization' : parse_BatchNorm } ) all_search ( nodes , { 'Concat' : parse_Concat } ) all_search ( nodes , { 'Add' : parse_Add , 'Sum' : parse_Sum , 'Transpose' : parse_Transpose , 'LRN' : parse_Lrn , 'Slice' : parse_Slice , 'Softmax' : parse_Softmax , 'Dropout' : parse_Dropout , 'Relu' : parse_Act , 'LeakyRelu' : parse_Act , 'ImageScaler' : parse_ImageScaler , 'MaxPool' : parse_Pooling , 'GlobalAveragePool' : parse_Pooling , 'AveragePool' : parse_Pooling , 'Reshape' : parse_Reshape } ) #nodes = rm_weight_node(nodes, weights) #print 'anakin_node: ', nodes return nodes