Paddle-Lite PaddleX产出的Mobilenet_v1模型无法进行quant_post脚本量化 设备使用amlogic npu加速

rqdpfwrv  于 2022-10-22  发布在  其他
关注(0)|答案(1)|浏览(226)
  • 版本、环境信息:

   1)Paddle Lite :lastest
   2)Host 环境:Ubuntu 20.04,cuda11.6
3)PaddleX版本:lastest

  • 模型信息

   1)模型名称:mobilenet_v1

  • 复现信息:使用官方文档中芯原npu的paddleslim方法
  • 问题描述:
  • 量化模型时提示错误

(paddle_env) lxh@1060:~/work/PaddleSlim-quant-demo/image_classification_demo/quant_post$ ./quant_post_rockchip_npu.sh
--------quantize fp32 model: inference_model-------------
----------- Configuration Arguments -----------
activation_bits: 8
activation_quantize_type: moving_average_abs_max
algo: KL
batch_nums: 10
batch_size: 10
data_dir: ../dataset/ILSVRC2012_val_100
is_full_quantize: 1
is_use_cache_file: 0
model_path: ../models/inference_model
optimize_model: 1
output_path: ../outputs/inference_model
quantizable_op_type: conv2d,depthwise_conv2d,mul
use_gpu: 0
use_slim: 1
weight_bits: 8
weight_quantize_type: abs_max

quantizable_op_type:['conv2d', 'depthwise_conv2d', 'mul']
/home/lxh/anaconda3/envs/paddle_env/lib/python3.8/site-packages/_distutils_hack/init.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
Thu Oct 20 22:27:50-INFO: Load model and set data loader ...
Traceback (most recent call last):
File "quant_post.py", line 59, in
quant_post(
File "/home/lxh/.local/lib/python3.8/site-packages/paddleslim/quant/quanter.py", line 540, in quant_post_static
post_training_quantization.quantize()
File "/home/lxh/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddle/fluid/contrib/slim/quantization/post_training_quantization.py", line 362, in quantize
self._load_model_data()
File "/home/lxh/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddle/fluid/contrib/slim/quantization/post_training_quantization.py", line 500, in _load_model_data
io.load_inference_model(dirname=self._model_dir,
File "/home/lxh/anaconda3/envs/paddle_env/lib/python3.8/site-packages/decorator.py", line 232, in fun
return caller(func, (extras + args),kw)
File "/home/lxh/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddle/fluid/wrapped_decorator.py", line 25, in
impl
*
return wrapped_func(args,kwargs)
File "/home/lxh/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddle/fluid/framework.py", line 443, in
impl
*
return func(*args,**kwargs)
File "/home/lxh/anaconda3/envs/paddle_env/lib/python3.8/site-packages/paddle/fluid/io.py", line 1580, in load_inference_model
with open(model_filename, "rb") as f:

FileNotFoundError: [Errno 2] No such file or directory: '../models/inference_model/model'

这边就是错误

这是我的模型文件

bq3bfh9z

bq3bfh9z1#

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看 官网文档常见问题历史Issue 来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQ and Github Issue to get the answer.Have a nice day!

相关问题