Skip to content

Commit 5eeca80

Browse files
authored
Update build_rknn.py
1 parent a910b32 commit 5eeca80

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

build_rknn.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ def ConvertModel(model_path='ViT-B-32__openai/textual/model.onnx', target_platfo
5151
if ret != 0:
5252
print("Build failed!")
5353
exit(ret)
54-
5554
print(model_path.replace('model.onnx',f'{target_platform}.rknn'))
56-
ret = rknn.init_runtime(target=target_platform, perf_debug=True)
57-
perf_detail = rknn.eval_perf()
58-
print(perf_detail)
55+
ret = rknn.accuracy_analysis(inputs=["rand.npy"], target=target_platform)
56+
if ret != 0:
57+
print("Accuracy analysis failed!")
58+
exit(ret)
5959
ret = rknn.export_rknn(model_path.replace('model.onnx',f'{target_platform}.rknn'))
6060
print(f"RKNN export reported with status {ret}")
6161
if ret != 0:

0 commit comments

Comments
 (0)