PaddleDetection对自己训练出来的ssd_mobilenetV1模型剪枝出错
Created by: TianyouChen
根据文档执行: python3 prune.py -c ../../configs/ssd/ssd_mobilenet_v1_Headshoulder.yml --print_params -o weights=/home/chenchaocun/PaddleDetection_slim/best_model 打印出参数后我试着剪一层参数的,执行以下指令: python3 prune.py -c ../../configs/ssd/ssd_mobilenet_v1_Headshoulder.yml --pruned_params "conv2d_24.w_0" --pruned_ratios="0.2" -o weights=/home/chenchaocun/PaddleDetection_slim/best_model 出现报错信息,如下: W0305 14:24:07.378476 23269 device_context.cc:237] Please NOTE: device: 0, CUDA Capability: 70, Driver API Version: 10.1, Runtime API Version: 9.0 W0305 14:24:07.382208 23269 device_context.cc:245] device: 0, cuDNN Version: 7.6. 2020-03-05 14:24:09,126-INFO: pruned params: ['conv2d_24.w_0'] 2020-03-05 14:24:09,127-INFO: pruned ratios: [0.2] Traceback (most recent call last): File "prune.py", line 392, in main() File "prune.py", line 197, in main only_graph=False)[0] File "/usr/local/lib/python3.5/dist-packages/paddleslim/prune/pruner.py", line 88, in prune walker.prune(param, pruned_axis=0, pruned_idx=pruned_idx) File "/usr/local/lib/python3.5/dist-packages/paddleslim/prune/prune_walker.py", line 53, in prune self._prune(var, pruned_axis, pruned_idx) File "/usr/local/lib/python3.5/dist-packages/paddleslim/prune/prune_walker.py", line 109, in _prune self._prune_op(op, var, pruned_axis, pruned_idx) File "/usr/local/lib/python3.5/dist-packages/paddleslim/prune/prune_walker.py", line 81, in _prune_op walker.prune(var, pruned_axis, pruned_idx) File "/usr/local/lib/python3.5/dist-packages/paddleslim/prune/prune_walker.py", line 53, in prune self._prune(var, pruned_axis, pruned_idx) File "/usr/local/lib/python3.5/dist-packages/paddleslim/prune/prune_walker.py", line 496, in _prune self._prune_op(op, out_var, pruned_axis, pruned_idx) File "/usr/local/lib/python3.5/dist-packages/paddleslim/prune/prune_walker.py", line 81, in _prune_op walker.prune(var, pruned_axis, pruned_idx) File "/usr/local/lib/python3.5/dist-packages/paddleslim/prune/prune_walker.py", line 53, in prune self._prune(var, pruned_axis, pruned_idx) File "/usr/local/lib/python3.5/dist-packages/paddleslim/prune/prune_walker.py", line 326, in _prune self._prune_op(op, in_var, pruned_axis, pruned_idx) File "/usr/local/lib/python3.5/dist-packages/paddleslim/prune/prune_walker.py", line 81, in _prune_op walker.prune(var, pruned_axis, pruned_idx) File "/usr/local/lib/python3.5/dist-packages/paddleslim/prune/prune_walker.py", line 53, in prune self._prune(var, pruned_axis, pruned_idx) File "/usr/local/lib/python3.5/dist-packages/paddleslim/prune/prune_walker.py", line 320, in _prune self._prune_op(op, in_var, pruned_axis, pruned_idx) File "/usr/local/lib/python3.5/dist-packages/paddleslim/prune/prune_walker.py", line 81, in _prune_op walker.prune(var, pruned_axis, pruned_idx) File "/usr/local/lib/python3.5/dist-packages/paddleslim/prune/prune_walker.py", line 53, in prune self._prune(var, pruned_axis, pruned_idx) File "/usr/local/lib/python3.5/dist-packages/paddleslim/prune/prune_walker.py", line 500, in _prune self._prune_op(op, in_var, pruned_axis, pruned_idx) File "/usr/local/lib/python3.5/dist-packages/paddleslim/prune/prune_walker.py", line 75, in _prune_op op.type()) AssertionError: The walker of rmsprop is not registered. 求助~