We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
使用https://github.com/[AnthonyF333/PFLD_GhostOne](https://github.com/AnthonyF333/PFLD_GhostOne)中的onnx人脸关键点检测onnx模型,使用paddlelit opt量化后推理结果错误,但通过paddleslim量化,不量化matmul_v2推理结果没有问题,量化matmul_v2后推理结果仍有问题。
The text was updated successfully, but these errors were encountered:
请贴上opt工具转后的详细报错日志。onnx模型需要通过X2Paddle工具转成PadddlePaddle模型后,在用opt工具转成优化模型推理。详细过程见https://www.paddlepaddle.org.cn/lite/v2.12/quick_start/tutorial.html 。关于量化部分也可以参考 https://www.paddlepaddle.org.cn/lite/v2.12/user_guides/quant_aware.html 。
Sorry, something went wrong.
推理脚本: paddleslim: paddleslim.quant.quant_post_dynamic( model_dir=model_dir, # 输入模型路径 model_filename=model_filename, # 输入模型计算图文件名称 params_filename=params_filename, # 输入模型参数文件名称 save_model_dir=save_dir, # 输出模型路径 save_model_filename=model_filename, # 输出模型计算图名称 save_params_filename=params_filename, # 输出模型参数文件名称 weight_bits=8, # 量化比特数 8/16 对应 INT8/16 类型 quantizable_op_type=['conv2d', 'mul', 'depthwise_conv2d'], # generate_test_model=True )
paddlelite: opt=Opt() opt.set_model_file(os.path.join(save_dir + "/quantized_model/model.pdmodel")) opt.set_param_file(os.path.join(save_dir + "/quantized_model/model.pdiparams")) #opt.set_model_dir("./pdmodel/inference_model") #opt.set_model_dir("./pdmodel_infer_quant_dynamic16/quantized_model") opt.set_valid_places(platform) opt.set_model_type("naive_buffer") opt.set_optimize_out("**_arm") opt.set_quant_model(False) #采用paddleslim量化,全连接层(matmul_v2)未量化,设置True后,matmul_v2会被量化,推理结果有误。 opt.set_quant_type("QUANT_INT8") opt.run()
推理结果如下:matmul_v2量化,推理结果错误,未量化,推理正确
ddchenhao66
No branches or pull requests
使用https://github.com/[AnthonyF333/PFLD_GhostOne](https://github.com/AnthonyF333/PFLD_GhostOne)中的onnx人脸关键点检测onnx模型,使用paddlelit opt量化后推理结果错误,但通过paddleslim量化,不量化matmul_v2推理结果没有问题,量化matmul_v2后推理结果仍有问题。
The text was updated successfully, but these errors were encountered: