语言:
🇨🇳
🇺🇸
«SSL»复现了论文Learning Structured Sparsity in Deep Neural Networks
除了论文提及的几种剪枝方式(滤波器剪枝/通道剪枝/滤波器_通道剪枝/层剪枝
)外,本仓库还测试了不同权重函数(group_lasso/mean_abs/mean/sum_abs/sum
)对于剪枝的影响。
更详细的训练数据可以查看:
基于Group Lasso
,SSL
实现了滤波器/通道/滤波器形状/层剪枝功能。
$ pip install -r requirements.txt
首先,设置环境变量
$ export PYTHONPATH=<project root path>
$ export CUDA_VISIBLE_DEVICES=0
然后进行训练-剪枝-微调
- 训练
$ python tools/train.py -cfg=configs/vggnet/vgg16_bn_cifar100_224_e100_sgd_mslr_ssl_filter_wise_1e_5.yaml
- 剪枝
$ python tools/prune/prune_vggnet.py
- 微调
$ python tools/train.py -cfg=configs/vggnet/refine_mean_abs_0_2_vgg16_bn_cifar100_224_e100_sgd_mslr_ssl_filter_wise_1e_5.yaml
最后,在配置文件的PRELOADED
选项中设置微调后的模型路径
$ python tools/test.py -cfg=configs/vggnet/refine_mean_abs_0_2_vgg16_bn_cifar100_224_e100_sgd_mslr_ssl_filter_wise_1e_5.yaml
- zhujian - Initial work - zjykzj
@misc{wen2016learning,
title={Learning Structured Sparsity in Deep Neural Networks},
author={Wei Wen and Chunpeng Wu and Yandan Wang and Yiran Chen and Hai Li},
year={2016},
eprint={1608.03665},
archivePrefix={arXiv},
primaryClass={cs.NE}
}
欢迎任何人的参与!打开issue或提交合并请求。
注意:
GIT
提交,请遵守Conventional Commits规范- 语义版本化,请遵守Semantic Versioning 2.0.0规范
README
编写,请遵守standard-readme规范
Apache License 2.0 © 2021 zjykzj