基于 develop 分支编包,EfficientNetB0、GhostNet_x1_0 与 MobileNetV1 等多个预测模型,多卡启动 自动压缩产出量化模型报错:IndexError: list index out of range
Traceback (most recent call last):
File "run.py", line 212, in <module>
main()
File "run.py", line 205, in main
ac.compress()
File "/opt/_internal/cpython-3.8.0/lib/python3.8/site-packages/paddleslim-0.0.0.dev0-py3.8.egg/paddleslim/auto_compression/compressor.py", line 586, in compress
self.single_strategy_compress(strategy, config, strategy_idx,
File "/opt/_internal/cpython-3.8.0/lib/python3.8/site-packages/paddleslim-0.0.0.dev0-py3.8.egg/paddleslim/auto_compression/compressor.py", line 769, in single_strategy_compress
train_program_info, test_program_info = self._prepare_program(
File "/opt/_internal/cpython-3.8.0/lib/python3.8/site-packages/paddleslim-0.0.0.dev0-py3.8.egg/paddleslim/auto_compression/compressor.py", line 519, in _prepare_program
train_program_info, test_program_info, self._quant_config = build_quant_program(
File "/opt/_internal/cpython-3.8.0/lib/python3.8/site-packages/paddleslim-0.0.0.dev0-py3.8.egg/paddleslim/auto_compression/create_compressed_program.py", line 432, in build_quant_program
train_program = quant_aware(
File "/opt/_internal/cpython-3.8.0/lib/python3.8/site-packages/paddleslim-0.0.0.dev0-py3.8.egg/paddleslim/quant/quanter.py", line 456, in quant_aware
transform_pass.apply(sub_graph)
File "/opt/_internal/cpython-3.8.0/lib/python3.8/site-packages/paddle/static/quantization/quantization_pass.py", line 2787, in apply
self._transform_forward(graph, op)
File "/opt/_internal/cpython-3.8.0/lib/python3.8/site-packages/paddle/static/quantization/quantization_pass.py", line 2562, in _transform_forward
var_node = self._insert_func(
File "/opt/_internal/cpython-3.8.0/lib/python3.8/site-packages/paddle/static/quantization/quantization_pass.py", line 994, in _insert_func
op_grad = op_out_grad.outputs[0]
IndexError: list index out of range
bug描述 Describe the Bug
问题描述
基于 develop 分支编包,EfficientNetB0、GhostNet_x1_0 与 MobileNetV1 等多个预测模型,多卡启动 自动压缩产出量化模型报错:IndexError: list index out of range
环境信息
复现方法
可参照 https://github.com/PaddlePaddle/PaddleSlim/tree/develop/example/auto_compression/image_classification
准备环境
执行多卡启动 自动压缩并产出量化模型
其他补充信息 Additional Supplementary Information
@zzjjay @vivienfanghuagood 辛苦看一下,谢谢。