@@ -101,6 +101,7 @@ def __call__(self):
101
101
102
102
# set inputs , you can change your input here
103
103
input_shape = session .get_inputs ()[0 ].shape
104
+ print (input_shape )
104
105
if self .tengine_model is not None :
105
106
input_array = np .random .randn (* input_shape ).astype (np .float32 )
106
107
else :
@@ -139,7 +140,7 @@ def _save_result(self, outputs, result, const_name):
139
140
print ("-------------------------------------------------" )
140
141
print ("export onnx output to text , please wait a moment" )
141
142
for one_node in tqdm (self .onnx_model .graph .node ):
142
- sufix = self .export_path + '/' + one_node .name
143
+ sufix = self .export_path + '/' + one_node .name . replace ( '/' , '-' )
143
144
for i , input in enumerate (one_node .input ):
144
145
if input not in const_name :
145
146
self ._write_data (sufix + f'_in_blob_data.txt' , result [outputs .index (input )])
@@ -265,7 +266,7 @@ def _align_by_layer(self, outputs, result):
265
266
print (out_info )
266
267
267
268
for one_node in self .onnx_model .graph .node :
268
- text_file_name = [one_node .name + "_out_blob_data.txt" , one_node .name + "_in_blob_data.txt" ]
269
+ text_file_name = [( one_node .name + "_out_blob_data.txt" ). replace ( '/' , '-' ), ( one_node .name + "_in_blob_data.txt" ). replace ( '/' , '-' ) ]
269
270
270
271
def compare_and_write (file_name , compare_input = False ):
271
272
if file_name in tm_txt_list :
0 commit comments