Comments (4)
- 如何理解敏感度裁切中的greedy_prune和普通的prune区别?
greedy_prune
一次只会剪裁topk
不敏感的卷积层,topk
默认为1.
prune
一次会剪裁所有指定的卷积层。
from paddleslim.
2.下列代码中 ,#标出的部分有何意义?为什么要乘2?
这里代码是在估算:剪掉当前卷积层多少channel才能使模型的整体FLOPs减少指定的比例。
step1: 先剪掉50%的channel
pruned_program, _, _ = pruner.prune(
program=graph.program,
scope=None,
params=[name],
ratios=[0.5], ################# 注意这里
place=None,
lazy=False,
only_graph=True)
step 2: 剪掉50%channel后,FLOPs减少了多少?
base_flops - flops(pruned_program)
step 3: FLOPs要减少10%, channel应该减少多少?
x/50% = target_pruned_flops / (base_flops - flops(pruned_program))
x = target_pruned_flops / (base_flops - flops(pruned_program))*2 #####所以有个2
from paddleslim.
3.下列代码中min_loss和max_loss初始值均为0,会导致while循环不执行
这里确实有问题,非常感谢反馈。
另外,更推荐参考这个教程,计算完敏感度后,手动调用剪裁接口:
https://paddlepaddle.github.io/PaddleSlim/tutorials/image_classification_sensitivity_analysis_tutorial.html
from paddleslim.
感谢解答
from paddleslim.
Related Issues (20)
- 在自动压缩中,如何查看蒸馏时的模型本身损失? HOT 2
- 自动压缩中的蒸馏损失为多个时,配置文件要怎么设置? HOT 2
- act 自动压缩pytorch_yolo实例中,python onnx--> tensorrt int8推理结果异常 HOT 1
- AttributeError: module 'paddleslim' has no attribute 'models' HOT 1
- 配置pruner的时候显示 0 collections
- 新年好!静态模型离线量化wav2lip,结束后发现没有所谓的 scale 文件 HOT 5
- 如何使用sensitive来确定yolov3 mobilenetv3的剪枝率呀? HOT 9
- 想问一下你们刚更新的目标检测模型离线量化示例,它支持旋转框吗?例如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
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.