深度学习模型压缩方法和框架 柔光的暖阳◎ 2022-03-31 07:30 505阅读 0赞 模型压缩的两种方法: 一、设计轻量级的模型(SqueezeNet,MobileNet,ShuffleNet等):不需要压缩。 二、模型结构/内存优化:剪枝、权值量化等 二、模型结构/内存优化 目前的框架主要有: **Deep** **Compression**、XNorNet、Distilling、PocketFlow腾讯、transform\_graph(tensorflow) 框架简介: 1、 Deep Compression a) 权值减枝 b) 权值量化(基于权值聚类,连续分布的权值离散化) c) 霍夫曼编码(减少平均编码长度大小) 论文地址:[http://arxiv.org/pdf/1510.00149v5.pdf][http_arxiv.org_pdf_1510.00149v5.pdf] 项目地址:[https://github.com/songhan/Deep-Compression-AlexNet][https_github.com_songhan_Deep-Compression-AlexNet] 评价:Deep Compression的主要设计是针对网络存储尺寸的压缩,但在前向时,如果将存储模型读入展开后,并没有带来更大的速度提升。因此Song H.等人专门针对压缩后的模型设计了一套基于FPGA的硬件前向加速框架EIE 2、 XNorNet 二值网络 3、 Distiler(intel AI Lab) 基于pytorch的模型压缩 其基本思想是通过一个性能好的大网络来教小网络学习,从而使得小网络能够具备跟大网络一样的性能,但蒸馏后的小网络参数规模远远小于原始大网络,从而达到压缩网络的目的。 论文地址:[https://arxiv.org/abs/1503.02531][https_arxiv.org_abs_1503.02531] 项目地址:[https://github.com/NervanaSystems/distiller][https_github.com_NervanaSystems_distiller] 4、 golw(facebook)(编译深度学习模型) 项目地址:[https://github.com/openai/glow][https_github.com_openai_glow] 5、 PocketFlow(腾讯) 基于tensorflow的模型压缩 说明文档:[https://pocketflow.github.io/][https_pocketflow.github.io] 项目地址:[https://github.com/Tencent/PocketFlow][https_github.com_Tencent_PocketFlow] PocketFlow包含许多模型压缩方法(通道减枝、权值稀疏化、权重量化、蒸馏、**超参数优化**) 暂不支持对象检测类型的模型压缩:[https://github.com/Tencent/PocketFlow/issues/44][https_github.com_Tencent_PocketFlow_issues_44] 6、transform\_graph tensorflow自带的压缩工具,可以看下效果。看一些博客说是,可以减少网络大小,但是速度提升很少。 [https://github.com/tensorflow/tensorflow/tree/master/tensorflow/tools/graph\_transforms][https_github.com_tensorflow_tensorflow_tree_master_tensorflow_tools_graph_transforms] [http_arxiv.org_pdf_1510.00149v5.pdf]: http://arxiv.org/pdf/1510.00149v5.pdf [https_github.com_songhan_Deep-Compression-AlexNet]: https://github.com/songhan/Deep-Compression-AlexNet [https_arxiv.org_abs_1503.02531]: https://arxiv.org/abs/1503.02531 [https_github.com_NervanaSystems_distiller]: https://github.com/NervanaSystems/distiller [https_github.com_openai_glow]: https://github.com/openai/glow [https_pocketflow.github.io]: https://pocketflow.github.io/ [https_github.com_Tencent_PocketFlow]: https://github.com/Tencent/PocketFlow [https_github.com_Tencent_PocketFlow_issues_44]: https://github.com/Tencent/PocketFlow/issues/44 [https_github.com_tensorflow_tensorflow_tree_master_tensorflow_tools_graph_transforms]: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/tools/graph_transforms
还没有评论,来说两句吧...