MCPcopy Create free account
hub / github.com/alibaba/MNN / run_mnn

Function run_mnn

tools/script/torchsscriptTest.py:34–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32 np.savetxt(output_file, ny, fmt='%f')
33
34def run_mnn():
35 # convert to mnn module
36 conv_res = run_cmd(['./MNNConvert', '-f', 'TS', '--modelFile', ts_module, '--MNNModel', mnn_module, '--bizCode', 'mnn'])
37 if (str(conv_res).find('Done') == -1):
38 print('Convert Error!')
39 return
40 # mnn run
41 message = run_cmd(['./testModel.out', mnn_module, input_file, output_file, '0', '0.001'])
42 # message = run_cmd(['./testModel.out', mnn_module, '/Users/wangzhaode/x.txt', '/Users/wangzhaode/y.txt', '0', '0.001'])
43 if (str(message).find('Correct') == -1):
44 print('Run Error!')
45 # return
46 print(message)
47
48if __name__ == '__main__':
49 import os

Callers 1

Calls 4

strFunction · 0.85
printFunction · 0.85
run_cmdFunction · 0.70
findMethod · 0.45

Tested by

no test coverage detected