8000 转换int8模型时报错 · Issue #214 · sophgo/tpu-mlir · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

转换int8模型时报错 #214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sztukai opened this issue Mar 7, 2025 · 0 comments
Open

转换int8模型时报错 #214

sztukai opened this issue Mar 7, 2025 · 0 comments

Comments

@sztukai
Copy link
sztukai commented Mar 7, 2025

1.6版本的量化工具链

model_transform.py
--model_name cardoor
--model_def 8nrelu.onnx
--input_shapes [[1,3,640,640]]
--keep_aspect_ratio
--mean 0.0,0.0,0.0
--scale 255,255,255
--pixel_format rgb
--test_input test.jpg
--test_result cardoor_onnx_test_outputs.npz
--mlir cardoor_onnx.mlir

#######################

run_calibration.py cardoor_onnx.mlir
--dataset quant_image
--input_num 200
-o cardoor_onnx_cali_table

#######################

model_deploy.py
--mlir cardoor_onnx.mlir
--quantize INT8
--calibration_table cardoor_onnx_cali_table
--processor bm1688
--test_input test.jpg
--test_reference cardoor_onnx_test_outputs.npz
--tolerance 0.85,0.85
--num_core 2
--model cardoor_bm1688_f16_num_core2.bmodelcd

Traceback (most recent call last):
File "/workspace/python/tools/model_deploy.py", line 375, in
lowering_patterns = tool.lowering()
File "/workspace/python/tools/model_deploy.py", line 141, in lowering
tool.validate_tpu_mlir()
File "/workspace/python/tools/model_deploy.py", line 235, in validate_tpu_mlir
f32_blobs_compare(self.tpu_npz, self.ref_npz, self.tolerance, self.excepts)
File "/workspace/python/utils/mlir_shell.py", line 222, in f32_blobs_compare
_os_system(cmd)
File "/workspace/python/utils/mlir_shell.py", line 51, in _os_system
raise RuntimeError("[!Error]: {}".format(cmd_str))
RuntimeError: [!Error]: npz_tool.py compare cardoor_bm1688_int8_sym_tpu_outputs.npz cardoor_onnx_test_outputs.npz --tolerance 0.85,0.85 --except - -vv
root@6a2656d99d89:/workspace/workspace/yyt/jiakai#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0