Deep Compression for PyTorch Model Deployment on Microcontrollers

Eren Dogan, H. Fatih Ugurdag, Hasan Unlu
3/29/2021
cs.LG
quantization-pruning

Official code: erendn/pytorch-compression-for-mcu (20 stars, Python, PyTorch, last commit 2021-03-26).

Abstract

Neural network deployment on low-cost embedded systems, hence on microcontrollers (MCUs), has recently been attracting more attention than ever. Since MCUs have limited memory capacity as well as limited compute-speed, it is critical that we employ model compression, which reduces both memory and compute-speed requirements.

Show full abstract

In this paper, we add model compression, specifically Deep Compression, and further optimize Unlu's earlier work on arXiv, which efficiently deploys PyTorch models on MCUs. First, we prune the weights 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 (without impacting performance and accuracy). In the case of the LeNet-5 model, the memory footprint was reduced by 12.45x, and the inference speed was boosted by 2.57x.

View on arXivView PDF

Code Implementations(1)

PyTorch

Deep Compression for PyTorch Model Deployment on Microcontrollers

205Python, CMar 22, 20215 years ago
convolutional-neural-networksdeep-compressiondeep-learningneural-networkpytorch

Similar Papers

Cite this paper

@article{dogan2021deep,
  title  = {Deep Compression for PyTorch Model Deployment on Microcontrollers},
  author = {Eren Dogan and H. Fatih Ugurdag and Hasan Unlu},
  year   = {2021},
  eprint = {2103.15972},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2103.15972}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2103.15972.svg)](https://codeofpaper.com/paper/2103.15972)

Discussion