PaddlePaddle / PaddleSlim

PaddleSlim is an open-source library for deep model compression and architecture search.
https://paddleslim.readthedocs.io/zh_CN/latest/
Apache License 2.0
1.56k stars 345 forks source link

使用自动压缩工具prune_dis对模型进行减枝模型参数变大 #1539

Closed LiquorPerfect closed 2 years ago

LiquorPerfect commented 2 years ago

padddleslim使用的develop版本 paddle版本是paddle2.4rc0 自动化压缩使用的是PaddleSlim-develop/example/auto_compression/image_classification/run.py 配置文件是PaddleSlim-develop/example/auto_compression/image_classification/configs/MobileNetV3_large_x1_0/prune_dis.yaml

对分类模型的减枝,执行命令python run.py后,模型参数大小变大了

原始模型参数: image 模型减枝后模型参数: image

ceci3 commented 2 years ago

您好,可以把剪枝后的模型参数文件发我们看下嘛?

LiquorPerfect commented 2 years ago

image 模型没用减枝,同时好像把权重也再模型pdmodel中

ceci3 commented 2 years ago

好的,我复现一下看看哈

ceci3 commented 2 years ago

修复pr:https://github.com/PaddlePaddle/PaddleSlim/pull/1548

LiquorPerfect commented 2 years ago

修复pr:#1548 还是没用修复好呀,一样的问题。 image 上图左边是最新的develop,右边是我本地修改的。 image

ceci3 commented 2 years ago

安装最新的paddleslim,或者2.4.0的slim试下