Comments (9)
这里的敏感度分析使用的是静态图代码,其中 ‘from ppdet.data.reader import create_reader’ 调用的是 static/ppdet/data/reader.py 中的函数,由于pip安装的是动态图paddledection,所以会找不到该函数。
解决方法:
- 可以pip uninstall paddledection后重新执行;
- 或者修改sensitive.py中 create_reader的调用路径;
from paddleslim.
是从重新安装paddledection版本可以吗 0.5版本?,那对应的paddle是多少版本呢?因为我单独改create_reader,后续很多方法调用路径也有问题。
from paddleslim.
安装0.5版本可以调用create_reader,但对应的paddle版本太低了,可能会有新的问题;
卸载paddledection后,直接执行sensitive.py就行了
from paddleslim.
paddlepaddle 2.1。paddleslim2.1 加上 PaddleDetedction工具包就可以执行吗? 我会有另外的问题,
aistudio@jupyter-2373595-7476238:/PaddleDetection$ python static/slim/sensitive/sensitive.py -c configs/yolov3/yolov3_mobilenet_v3_270e_voc.yml -p/PaddleDetection$
[02-22 11:04:27 MainThread @logger.py:242] Argv: static/slim/sensitive/sensitive.py -c configs/yolov3/yolov3_mobilenet_v3_270e_voc.yml -p
[02-22 11:04:27 MainThread @utils.py:79] WRN paddlepaddle version: 2.1.2. The dynamic graph version of PARL is under development, not fully tested and supported
Traceback (most recent call last):
File "static/slim/sensitive/sensitive.py", line 36, in
from paddleslim.prune import sensitivity
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddleslim/init.py", line 17, in
from paddleslim import prune
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddleslim/prune/init.py", line 16, in
from .pruner import *
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddleslim/prune/pruner.py", line 20, in
from ..core import VarWrapper, OpWrapper, GraphWrapper
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddleslim/core/init.py", line 19, in
from ..core import dygraph
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddleslim/core/dygraph.py", line 9, in
from ..common import get_logger
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddleslim/common/init.py", line 21, in
from .server import Server
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddleslim/common/server.py", line 28, in
from .rl_controller.utils import add_grad, ConnectMessage
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddleslim/common/rl_controller/init.py", line 19, in
import parl
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/parl/init.py", line 47, in
from parl.remote import remote_class, connect
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/parl/remote/init.py", line 19, in
from parl.remote.remote_decorator import *
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/parl/remote/remote_decorator.py", line 19, in
from parl.remote.remote_wrapper import RemoteWrapper
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/parl/remote/remote_wrapper.py", line 21, in
from parl.remote.communication import loads_argument, loads_return,
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/parl/remote/communication.py", line 38, in
context = pyarrow.default_serialization_context()
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/pyarrow/init.py", line 317, in getattr
"module 'pyarrow' has no attribute '{0}'".format(name)
AttributeError: module 'pyarrow' has no attribute 'default_serialization_context'
aistudio@jupyter-2373595-7476238:
from paddleslim.
能否有一个版本对应能跑出来的吗?就是目标检测网络明感度分析? 使用paddledetection。
from paddleslim.
在剪枝的时候,我是这样配置的剪枝率。因为查不到其敏感度,我根据ppyolo mbv3 large的剪枝率来配置的。您们有关于这部分的配置吗?
from paddleslim.
这个剪枝率应该设置反了吧,0.75太大了,会导致较大的精度损失,应该是0.25比较合理。
我们没有做过ppyolo mbv3 large的剪枝实验,可以按照示例去尝试运行剪枝敏感度分析~
from paddleslim.
我就是设置的0.75,只剪枝了6个层,精度最后还行。voc上精度下降2-3%。
敏感度分析就是按照示例分析不出来。。。报错。。。。。。
我看你们文档说敏感度分析的定义,是按照裁剪某一层的10%,然后直接测试其精度,我这边直接像上面那样配置,如果只裁剪某一个卷积层的比如 conv2d_62.w_0的10%,这样配置。直接在原模型上去测试精度,精度几乎都没了.....
python tools/eval.py -c configs/yolov3/yolov3_mobilenet_v3_large_270e_voc.yml --slim_config configs/slim/prune/yolov3_mbv3_prune_fpgm.yml -o weights=yolov3_mobilenet_v3_large_270e_voc.pdparams
from paddleslim.
敏感度分析就是按照示例分析不出来。。。报错。。。。。。
这个报错可以按照上面的修改建议试试呢
直接在原模型上去测试精度,精度几乎都没了.....
可以尝试更换l2-norm指标看看,也可能就是说明该conv比较重要,裁剪容易导致较大精度损失,需要后续重新finetune。
from paddleslim.
Related Issues (20)
- 配置pruner的时候显示 0 collections
- 新年好!静态模型离线量化wav2lip,结束后发现没有所谓的 scale 文件 HOT 5
- 想问一下你们刚更新的目标检测模型离线量化示例,它支持旋转框吗?例如ppyoloe-r HOT 4
- [Bug]TypeError: 'float' object is not iterable HOT 1
- 有考虑过新增人脸检测模型的压缩例程嘛? HOT 3
- 请问出现这种情况的原因会是什么?# 自动压缩 autoCompression HOT 4
- 使用paddleslim模型动态剪枝后,如何保存模型呢
- 文档中提供的自动压缩后RT-DETR模型的准确率很低 HOT 5
- 如何固定Softmax这个op的量化参数 HOT 5
- 关于自动压缩yolov8-s,run.py的时候出错。 HOT 3
- 报错:var_tensor.shape[0],tuple index out of range HOT 1
- paddleslim量化的模型如何使用openvino进行推理 HOT 1
- rtdetr进行自动压缩过程中报错如下 HOT 2
- rtdetr nms false HOT 1
- AttributeError HOT 2
- from paddleslim.dygraph.dist中没有import AdaptorBase HOT 12
- 离线量化paddleocr文字识别模型报错问题ValueError: (InvalidArgument) shape should have the save dim with perm, but received shape size is:4, perm size is:3 HOT 1
- 请问,压缩V4检测 server模型,需要使用什么数据集? HOT 6
- 无法复现教程中的OCR v3检测模型的量化精度 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paddleslim.