-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
NotImplementedError: (Unimplemented) Delete Weight Dequant Linear Op Pass is not supported for per-channel quantization #13083
Comments
predict.py如下 |
import os from PIL import Image class PredictConfig():
def get_test_images(infer_file): def load_predictor(model_dir): def create_inputs(imgs, im_info):
class Detector(object):
def process_image(detector, im_path, threshold):
def predict_image(detector, image_list, result_path, threshold):
def main(infer_txt, result_path, det_model_path, threshold):
if name == 'main':
|
This is a Paddle framework issue. You can try updating your PaddlePaddle version or submit an issue to the paddlepaddle/paddle repository. |
|
问题描述 / Problem Description
模型在自动压缩之前可以正常运行,自动压缩之后开始报错,错误大概是这个错误表明你在尝试使用不支持的操作。根据错误消息,可能是在尝试使用Delete Weight Dequant Linear Op Pass来处理权重去量化线性操作,但该操作不支持通道量化,不知道怎么解决 完全按照https://github.com/PaddlePaddle/PaddleSlim/tree/develop/example/auto_compression/detection#4%E9%A2%84%E6%B5%8B%E9%83%A8%E7%BD%B2教程走的。
运行环境 / Runtime Environment
复现代码 / Reproduction Code
完整报错 / Complete Error Message
#predict.py
%cd ~
!python predict.py /home/aistudio/work/data/val/test.txt result.json
/home/aistudio
Model Arch: DETR
--transform op: Resize
--transform op: NormalizeImage
--transform op: Permute
Traceback (most recent call last):
File "/home/aistudio/predict.py", line 221, in
main(infer_txt, result_path, det_model_path, threshold)
File "/home/aistudio/predict.py", line 204, in main
detector = Detector(pred_config, det_model_path)
File "/home/aistudio/predict.py", line 126, in init
self.predictor, self.config = load_predictor(model_dir)
File "/home/aistudio/predict.py", line 78, in load_predictor
predictor = create_predictor(config)
NotImplementedError: (Unimplemented) Delete Weight Dequant Linear Op Pass is not supported for per-channel quantization (at ../paddle/fluid/framework/ir/delete_weight_dequant_linear_op_pass.cc:130)
可能解决方案 / Possible solutions
附件 / Appendix
The text was updated successfully, but these errors were encountered: