## TensorFlow implementation of "Iterative Pruning"
## File descriptions and usages
model_ckpt_dense: original model<br>
model_ckpt_dense_pruned: 90% pruned-only model<br>
model_ckpt_sparse_retrained: 90% pruned and retrained model<br>
#### Python package requirements
```bash
sudo apt-get install python-scipy python-numpy python-matplotlib
```
To regenerate these sparse model, edit ```config.py``` first as your threshold configuration,
and then run training with second (pruning and retraining) and third (generate sparse form of weight data) round options.
```bash
./train.py -2 -3
```
To inference single image (seven.png) and measure its latency,
```bash
./deploy_test.py -d -m model_ckpt_dense
./deploy_test_sparse.py -d -m model_ckpt_sparse_retrained
```
To test dense model,
```bash
./deploy_test.py -t -m model_ckpt_dense
./deploy_test.py -t -m model_ckpt_dense_pruned
./deploy_test.py -t -m model_ckpt_dense_retrained
```
To draw histogram that shows the weight distribution,
```bash
# After running train.py (it generates .dat files)
./draw_histogram.py
```
## Performance
Results are currently somewhat mediocre or degraded due to indirection and additional storage overhead originated from sparse matrix form.
Also, it may because model size is too small. (12.49MB)
#### Storage overhead
Baseline: 12.49 MB<br>
10 % pruned: 21.86 MB<br>
20 % pruned: 19.45 MB<br>
30 % pruned: 17.05 MB<br>
40 % pruned: 14.64 MB<br>
50 % pruned: 12.23 MB<br>
60 % pruned: 9.83 MB<br>
70 % pruned: 7.42 MB<br>
80 % pruned: 5.02 MB<br>
90 % pruned: 2.61 MB<br>
#### CPU performance (5 times averaged)
CPU: Intel Core i5-2500 @ 3.3 GHz,
LLC size: 6 MB
<img src=http://younghwanoh.github.io/images/cpu-desktop.png alt=http://younghwanoh.github.io/images/cpu-desktop.png>
Baseline: 0.01118040085 s<br>
10 % pruned: 1.919299984 s<br>
20 % pruned: 0.2325239658 s<br>
30 % pruned: 0.2111079693 s<br>
40 % pruned: 0.1982570648 s<br>
50 % pruned: 0.1691776752 s<br>
60 % pruned: 0.1305227757 s<br>
70 % pruned: 0.116039753 s<br>
80 % pruned: 0.103564167 s<br>
90 % pruned: 0.1058168888 s<br>
#### GPU performance (5 times averaged)
GPU: Nvidia Geforce GTX650 @ 1.058 GHz,
LLC size: 256 KB
<img src=http://younghwanoh.github.io/images/gpu-desktop.png alt=http://younghwanoh.github.io/images/gpu-desktop.png>
Baseline: 0.1475181845 s<br>
10 % pruned: 0.2954540253 s<br>
20 % pruned: 0.2665398121 s<br>
30 % pruned: 0.2585638046 s<br>
40 % pruned: 0.2090051651 s<br>
50 % pruned: 0.1995279789 s<br>
60 % pruned: 0.1815193653 s<br>
70 % pruned: 0.1436806202 s<br>
80 % pruned: 0.135668993 s<br>
90 % pruned: 0.1218701839 s<br>
算法剪枝-基于Tensorflow实现的迭代剪枝-算法优化-附项目源码-优质项目实战.zip
版权申诉
105 浏览量
2024-05-20
14:23:58
上传
评论
收藏 20.09MB ZIP 举报
![avatar](https://profile-avatar.csdnimg.cn/default.jpg!1)
Mopes__
- 粉丝: 1414
- 资源: 411
最新资源
- 机器学习客观题测验,备战期末复习的题库
- HBR740语音识别协处理芯片开发工具包(硬件参考设计原理图+PCB+51单片机软件驱动源码DEMO例程+文档资料).zip
- 数据库管理工具:dbeaver-ce-23.0.1-macos-aarch64.dmg
- M25P20, M25P40, M25P80, M25P16, M25P32, M25P64存储 SPI FLASH C语言驱动
- Matlab基于PCA算法的简单图像人脸识别.zip
- 免费的画图工具drawio,可以代替visio,版本24.5.3,适用于windows
- 瑞昱RTL8723DS-WiFi-linux- android 驱动 内含详细移植说明,支持android4.4
- AMSR/ADEOS-II L1A Raw Observation Counts, Version 3用户手册
- zaopingshujufenxi.zip
- 六级作文模板万能句型pdf.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)