Using Deep Compression on PyTorch Models for Autonomous Systems

E. Dogan, H. F. Ugurdag, Hasan Unlu
{"title":"Using Deep Compression on PyTorch Models for Autonomous Systems","authors":"E. Dogan, H. F. Ugurdag, Hasan Unlu","doi":"10.1109/SIU55565.2022.9864848","DOIUrl":null,"url":null,"abstract":"Applications of artificial neural networks on low-cost embedded systems and microcontrollers (MCUs), has recently been attracting more attention than ever. Since MCUs have limited memory capacity as well as limited compute-speed compared to workstations, employment of current deep learning algorithms on MCUs becomes more practical with the help of model compression. This makes MCUs common and practical alternative solution for autonomous systems. In this paper, we add model compression, specifically Deep Compression, to an existing work, which efficiently deploys PyTorch models on MCUs, in order to increase neural network speed and save electrical power. First, we prune the weight values close to zero in convolutional and fully connected layers. Secondly, the remaining weights and activations are quantized to 8-bit integers from 32-bit floating-point. Finally, forward pass functions are compressed using special data structures for sparse matrices, which store only nonzero weights. In the case of the LeNet-5 model, the memory footprint was reduced by 12.5x, and the inference speed was boosted by 2.6x.","PeriodicalId":115446,"journal":{"name":"2022 30th Signal Processing and Communications Applications Conference (SIU)","volume":"16 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-05-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 30th Signal Processing and Communications Applications Conference (SIU)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SIU55565.2022.9864848","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Applications of artificial neural networks on low-cost embedded systems and microcontrollers (MCUs), has recently been attracting more attention than ever. Since MCUs have limited memory capacity as well as limited compute-speed compared to workstations, employment of current deep learning algorithms on MCUs becomes more practical with the help of model compression. This makes MCUs common and practical alternative solution for autonomous systems. In this paper, we add model compression, specifically Deep Compression, to an existing work, which efficiently deploys PyTorch models on MCUs, in order to increase neural network speed and save electrical power. First, we prune the weight values close to zero in convolutional and fully connected layers. Secondly, the remaining weights and activations are quantized to 8-bit integers from 32-bit floating-point. Finally, forward pass functions are compressed using special data structures for sparse matrices, which store only nonzero weights. In the case of the LeNet-5 model, the memory footprint was reduced by 12.5x, and the inference speed was boosted by 2.6x.
在自主系统的PyTorch模型上使用深度压缩
近年来,人工神经网络在低成本嵌入式系统和微控制器(mcu)上的应用越来越受到关注。由于与工作站相比,mcu具有有限的内存容量和有限的计算速度,因此在模型压缩的帮助下,在mcu上使用当前的深度学习算法变得更加实用。这使得单片机成为自主系统通用且实用的替代解决方案。在本文中,我们将模型压缩,特别是深度压缩,添加到现有的工作中,该工作有效地在mcu上部署PyTorch模型,以提高神经网络速度并节省电力。首先,我们在卷积层和全连接层中将权值修剪到接近零。其次,剩余的权重和激活从32位浮点量化为8位整数。最后,前向传递函数使用稀疏矩阵的特殊数据结构进行压缩,该结构仅存储非零权重。以LeNet-5模型为例,内存占用减少了12.5倍,推理速度提高了2.6倍。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信