@@ -42,7 +42,7 @@ def read_onnx(path):
4242 with open (path + '.txt' ) as f :
4343 cont = f .read ()
4444 for i in res : cont = i .sub (parse , cont )
45- #for i in cont.split('\n'): print(i)
45+ # for i in cont.split('\n'): print(i)
4646 cont = [eval (i ) for i in cont .split ('\n ' ) if len (i )> 0 and i [0 ]== '[' ]
4747 cont = [[eval (j ) if (',' in j ) else j for j in i ] for i in cont ]
4848
@@ -58,7 +58,7 @@ def read_onnx(path):
5858 flow .append ((i [4 ][0 ], ['conv_%s' % num ], i [0 ]))
5959 elif i [1 ]== 'Gemm' :
6060 num = len (body )
61- body .append (('dense_%s' % num , 'dense' , key [i [2 ][1 ][:: - 1 ] ]))
61+ body .append (('dense_%s' % num , 'dense' , key [i [2 ][1 ]]))
6262 flow .append ((i [2 ][0 ], ['dense_%s' % num ], i [0 ]))
6363 elif i [1 ]== 'Sigmoid' :
6464 num = len (body )
@@ -93,8 +93,8 @@ def read_onnx(path):
9393 body .append (('flatten_%s' % num , 'flatten' , None ))
9494 flow .append ((i [2 ], ['flatten_%s' % num ], i [0 ]))
9595
96- #for i in body: print(i)
97- #for i in flow: print(i)
96+ # for i in body: print(i)
97+ # for i in flow: print(i)
9898
9999 net = Net ()
100100 net .load_json (body , flow )
0 commit comments