AI实战:深度学习模型压缩:模型裁剪——Pruning with Tensorflow

前言


从工程角度来说,模型压缩其目的是将算法更稳定、高效的落地在硬件平台上,效率是其追求的目标。复杂的模型固然具有更好的性能,但是高额的存储空间、计算资源消耗是使其难以有效的应用在各硬件平台上。


本文总结深度学习模型裁剪的一些方法及开源代码分享。



模型裁剪


  • 深度学习模型裁剪方法:

    1、剪枝

    2、权值共享

    3、量化

    4、神经网络二值化



  • Pruning经典开源代码及论文

    1、《TensorFlow implementation of “Iterative Pruning”》

    实现基于论文:Learning both Weights and Connections for Efficient Neural Network (http://arxiv.org/pdf/1506.02626v3.pdf)

    核心思想:学习重要的连接,根据连接的权重进行裁剪,fine-tuning让网络保持稀疏的连接。

    下面是主要内容,包括在CPU、GPU上不同pruning比例的加速效果对比:
    AI实战:深度学习模型压缩:模型裁剪——Pruning with Tensorflow_第1张图片
    github地址:https://github.com/garion9013/impl-pruning-TF


    2、《Deep compression》

    实现基于论文:Deep Compression: Compressing Deep Neural Networks with Pruning, Trained Quantization and Huffman Coding (https://arxiv.org/abs/1510.00149)

    核心思想:裁剪(阈值)、量化(8bit,存储方式)、哈夫曼编码

    主要内容如下:

    github地址:https://github.com/WojciechMormul/deep-compression


3、《Pruning with Tensorflow》

核心思想:删除small Weights,然后fine-tuning模型

主要内容如下:
AI实战:深度学习模型压缩:模型裁剪——Pruning with Tensorflow_第2张图片
github地址:https://github.com/ex4sperans/pruning_with_tensorflow



其他论文

1、Exploiting linear structure within convolutional networks for efficient evaluation.

2、Eie: Efficient inference engine on compressed deep neural network.

3、Deep Model Compression: Distilling Knowledge from Noisy Teachers

4、PerforatedCNNs: Acceleration through Elimination of Redundant Convolutions

5、PRUNING FILTERS FOR EFFICIENT CONVNETS

你可能感兴趣的:(深度学习,图像识别,人工智能,模型压缩)