## CPSCA
This is the source code for our paper: Channel Pruning Guided by Spatial and Channel Attention for DNNs in
Intelligent Edge Computing. A brief introduction of this work is as follows:
> Deep Neural Networks (DNNs) have achieved remarkable success in many computer vision tasks recently, but the huge number of parameters and the high computation overhead hinder their deployments on resource-constrained edge devices. It is worth noting that channel pruning is an effective approach for compressing DNN models. A critical challenge is to determine which channels are to be removed, so that the model accuracy will not be negatively affected. In this paper, we first propose Spatial and Channel Attention (SCA), a new attention module combining both spatial and channel attention that respectively focuses on "where" and "what" are the most informative parts. Guided by the scale values generated by SCA for measuring channel importance, we further propose a new channel pruning approach called Channel Pruning guided by Spatial and Channel Attention (CPSCA). Experimental results indicate that SCA achieves the best inference accuracy, while incurring negligibly extra resource consumption, compared to other state-of-the-art attention modules. Our evaluation on two benchmark datasets shows that, with the guidance of SCA, our CPSCA approach achieves higher inference accuracy than other state-of-the-art pruning methods under the same pruning ratios.
This paper has been accepted and has been published by [Applied Soft Computing (ASOC)](https://www.journals.elsevier.com/applied-soft-computing), and the preprint version can be downloaded from [here](https://arxiv.org/abs/2011.03891). You can also download the formal version from [here](https://doi.org/10.1016/j.asoc.2021.107636).
We only provide our SCA and CPSCA here. You can find the implementation of other attention models mentioned in our paper from [PytorchInsight](https://github.com/implus/PytorchInsight). Due to some reason, we didn't provide the scaler_for_prune.txt file required by prune.py in the released code. If you want to know how to generate it, please contact the 1st author with [email protected].
## Required software
PyTorch
## Citation
If you use these models in your research, please cite:
@article{LIU2021107636,
title = {Channel pruning guided by spatial and channel attention for DNNs in intelligent edge computing},
journal = {Applied Soft Computing},
volume = {110},
pages = {107636},
year = {2021},
issn = {1568-4946},
doi = {https://doi.org/10.1016/j.asoc.2021.107636},
url = {https://www.sciencedirect.com/science/article/pii/S1568494621005573},
author = {Mengran Liu and Weiwei Fang and Xiaodong Ma and Wenyuan Xu and Naixue Xiong and Yi Ding},
}
## Contact
Mengran Liu ([email protected])
> Please note that the open source code in this repository was mainly completed by the graduate student author during his master's degree study. Since the author did not continue to engage in scientific research work after graduation, it is difficult to continue to maintain and update these codes. We sincerely apologize that these codes are for reference only.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
智能边缘计算中基于空间和通道关注度的DNN通道剪枝的python源码 Channel Pruning Guided by Spatial and Channel Attention for DNNs in Intelligent Edge Computing - 不懂运行,下载完可以私聊问,可远程教学 该资源内项目源码是个人的毕设,代码都测试ok,都是运行成功后才上传资源,答辩评审平均分达到96分,放心下载使用! <项目介绍> 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.md文件(如有),仅供学习参考, 切勿用于商业用途。 --------
资源推荐
资源详情
资源评论
收起资源包目录
CPSCA-main.zip (11个子文件)
CPSCA-main
source_code
SCA.py 18KB
compute_flops.py 4KB
resnet_SCA.py 4KB
prune.py 11KB
resnet.py 4KB
models
__init__.py 80B
resnet.py 4KB
vgg.py 3KB
train.py 10KB
__pycache__
New_SGE_2_1.cpython-35.pyc 6KB
README.md 3KB
共 11 条
- 1
资源评论
机智的程序员zero
- 粉丝: 1950
- 资源: 4199
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功