Comments (3)
感謝您的回覆, 我有嘗試過避開被完全剪枝掉的層但尚未成功,請問有什麼方法或修改哪部分能像你說的約束不完全剪掉層數,或是避開被完全裁剪層?
一种简单的方式是在执行剪枝操作前判断是否会全部剪完,如果会剪完,则保留允许的最低通道数。这样可以保证每一层不会被完全剪枝掉。同时也还有其他方式,比如降低阈值等等。可以视具体情况选择。
from pagcp.
剪枝過一次的模型,想再剪枝一次壓縮參數量,目前是將剪枝過後的模型先載入,再載入權重,但會遇到以下問題,想請問這作法是否是對的?
RuntimeError: Given groups=1, expected weight to be at least 1 at dimension 0, but got weight of size [0, 2, 1, 1] instead
您好,感谢您对工作的关注。
首先关于迭代剪枝的方式,您可以直接载入模型和权重,所以您的做法应该是没问题的。从报错信息来看,您的压缩模型中应该存在某些层的通道被剪完了,可以调试一下看看具体报错在哪一层的剪枝上,然后适当调整一下压缩比例或者加一些压缩约束来保证这个层不会被完全剪掉。
希望上述回复能解答您的相关疑问。若仍有疑惑,欢迎进一步交流。
from pagcp.
感謝您的回覆,
我有嘗試過避開被完全剪枝掉的層但尚未成功,請問有什麼方法或修改哪部分能像你說的約束不完全剪掉層數,或是避開被完全裁剪層?
from pagcp.
Related Issues (20)
- Cannot successfully run compress.py HOT 1
- 请问为什么要设立三个分组?
- W
- 关于剪枝前模型每层基于FLOPs重排问题 HOT 6
- 报错 HOT 2
- yolov8 pruning HOT 4
- 剪枝后推理速度 HOT 1
- Pruning based on self built datasets HOT 1
- Γ? HOT 1
- Selecting the channels
- 怎么导出onnx格式? HOT 9
- Code for NYUv2 Dataset
- Compression result of Faster Rcnn on COCO HOT 1
- compress.py文件运行不成功 HOT 1
- Error while replicating the flow suggested in Readme.md HOT 1
- 问题咨询 HOT 2
- 如何提高剪枝率 HOT 9
- 为何没有YOLOv5s的剪枝测试? HOT 1
- 修改网络模型后如何修改相应文件 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 pagcp.