模型量化KeyError
Created by: dubhex
使用1.5.2版本paddle进行模型int8量化,参照官方示例量化代码,运行时报错
Traceback (most recent call last): File "src/trainQuant.py", line 127, in main() File "src/trainQuant.py", line 124, in main eval(args) File "src/trainQuant.py", line 79, in eval freeze_pass.apply(test_graph) File "/home/vis/guohanqi/workspace/facelmkQuant_Paddle/env_Paddle1.52/lib/python3.6/site-packages/paddle/fluid/contrib/slim/quantization/quantization_pass.py", line 641, in apply self._insert_post_dequant_op(graph, op_node) File "/home/vis/guohanqi/workspace/facelmkQuant_Paddle/env_Paddle1.52/lib/python3.6/site-packages/paddle/fluid/contrib/slim/quantization/quantization_pass.py", line 740, in _insert_post_dequant_op scale_v = self._var_scale_map[original_var_name] KeyError: 'conv2d_14.w_0'
模型是1.3版本的paddle训练的,确定可以使用。想请问这个问题该如何解决?