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
AttributeError: 'Operation' object has no attribute 'config' #262
Comments
让我来研究一下 |
嗯嗯,谢谢志佬~ |
这个是因为在量化的过程中某个op没有量化参数,你的模型方便发过来看下吗? |
嗯嗯,我是用的mmdeploy,将模型导出,然后放到ppq上面跑,我用的命令是这个 |
你是要量化tenserrt模型吗?建议把mmdeploy的中间结果onnx保存下来,然后用ppq来做量化,有问题可以联系我们 |
是的,有保存下来正准备量化你的网络,检查下列设置: Block [1 / 17]: [Conv_2 -> MaxPool_6]/root/miniconda3/envs/mmdeploy/lib/python3.8/site-packages/torch/optim/adam.py:90: UserWarning: optimizer contains a parameter group with duplicate parameters; in future, this will cause an error; see github.com/pytorch/pytorch/issues/40967 for more information Tuning Procedure : 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 500/500 [00:02<00:00, 180.57it/s]Tuning Finished : (0.0004 -> 0.0003) [Block Loss]Block [2 / 17]: [Conv_7 -> Conv_9]Tuning Procedure : 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 500/500 [00:01<00:00, 407.28it/s]Tuning Finished : (0.0003 -> 0.0003) [Block Loss]Block [3 / 17]: [Conv_12 -> Conv_14]Tuning Procedure : 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 500/500 [00:01<00:00, 408.50it/s]Tuning Finished : (0.0004 -> 0.0004) [Block Loss]Block [4 / 17]: [Conv_17 -> Conv_19]Tuning Procedure : 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 500/500 [00:00<00:00, 594.49it/s]Tuning Finished : (0.0004 -> 0.0004) [Block Loss]Block [5 / 17]: [Conv_20 -> Conv_20]Tuning Procedure : 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 500/500 [00:00<00:00, 1235.16it/s]Tuning Finished : (0.0002 -> 0.0002) [Block Loss]Block [6 / 17]: [Conv_23 -> Conv_25]Tuning Procedure : 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 500/500 [00:00<00:00, 562.64it/s]Tuning Finished : (0.0005 -> 0.0004) [Block Loss]Block [7 / 17]: [Conv_28 -> Conv_30]Tuning Procedure : 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 500/500 [00:01<00:00, 292.34it/s]Tuning Finished : (0.0004 -> 0.0003) [Block Loss]Block [8 / 17]: [Conv_31 -> Conv_31]Tuning Procedure : 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 500/500 [00:00<00:00, 1207.17it/s]Tuning Finished : (0.0001 -> 0.0001) [Block Loss]Block [9 / 17]: [Conv_34 -> Conv_36]Tuning Procedure : 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 500/500 [00:02<00:00, 236.83it/s]Tuning Finished : (0.0006 -> 0.0004) [Block Loss]Block [10 / 17]: [Conv_39 -> Conv_41]Tuning Procedure : 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 500/500 [00:05<00:00, 88.46it/s]Tuning Finished : (0.0053 -> 0.0023) [Block Loss]Block [11 / 17]: [Conv_42 -> Conv_42]Tuning Procedure : 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 500/500 [00:00<00:00, 637.11it/s]Tuning Finished : (0.0011 -> 0.0010) [Block Loss]Block [12 / 17]: [Conv_47 -> Conv_47]Tuning Procedure : 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 500/500 [00:02<00:00, 185.00it/s]Tuning Finished : (0.0038 -> 0.0028) [Block Loss]Block [13 / 17]: [Conv_51 -> Relu_52]Tuning Procedure : 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 500/500 [00:00<00:00, 1144.64it/s]Tuning Finished : (0.0001 -> 0.0001) [Block Loss]Block [14 / 17]: [Conv_61 -> Relu_62]Tuning Procedure : 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 500/500 [00:00<00:00, 1165.95it/s]Tuning Finished : (0.0001 -> 0.0001) [Block Loss]Block [15 / 17]: [Conv_68 -> Relu_69]Tuning Procedure : 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 500/500 [00:00<00:00, 1156.99it/s]Tuning Finished : (0.0001 -> 0.0000) [Block Loss]Block [16 / 17]: [Conv_75 -> Relu_76]Tuning Procedure : 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 500/500 [00:00<00:00, 1169.28it/s]Tuning Finished : (0.0001 -> 0.0001) [Block Loss]Block [17 / 17]: [Conv_84 -> Resize_88]Tuning Procedure : 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 500/500 [00:02<00:00, 216.09it/s]Tuning Finished : (0.0097 -> 0.0089) [Block Loss]Finished. |
在ppq/ppq/parser/trt_exporter.py的第26行加: print(op.name) 然后再跑一次,看看是哪个op没有写量化参数 |
嗯嗯,谢谢大佬 |
有结果了吗? |
/ / / /__/ // / // / // / / / / // // / // / / using ppq: ['/root/miniconda3/envs/mmdeploy/lib/python3.8/site-packages/ppq-0.6.5.1-py3.8.egg/ppq'] |
你把 /root/miniconda3/envs/mmdeploy/lib/python3.8/site-packages/ppq-0.6.5.1-py3.8.egg/ppq 卸载了(pip uninstall ppq) |
重新git clone,用最新的master分支来跑 |
这个引入caffe是因为有些用户输入的是caffe模型,尝试了新的分支了吗?现在还有问题吗? |
尝试新的分支了,已经解决啦,谢谢大佬耐心的解答~ |
Traceback (most recent call last):
File "ProgramEntrance.py", line 200, in
export_ppq_graph(
File "/root/miniconda3/envs/mmdeploy/lib/python3.8/site-packages/ppq-0.6.5.1-py3.8.egg/ppq/api/interface.py", line 628, in export_ppq_graph
exporter.export(file_path=graph_save_to, config_path=config_save_to, graph=graph, **kwargs)
File "/root/miniconda3/envs/mmdeploy/lib/python3.8/site-packages/ppq-0.6.5.1-py3.8.egg/ppq/parser/trt_exporter.py", line 53, in export
self.export_quantization_config(config_path, graph)
File "/root/miniconda3/envs/mmdeploy/lib/python3.8/site-packages/ppq-0.6.5.1-py3.8.egg/ppq/parser/trt_exporter.py", line 29, in export_quantization_config
input_cfg = op.config.input_quantization_config[0]
AttributeError: 'Operation' object has no attribute 'config'
在ProgramEntrance.py中调用trt_int8出错,但是调用PPL_CUDA_INT8却没有这个问题
The text was updated successfully, but these errors were encountered: