Layer Folding: Neural Network Depth Reduction using Activation Linearization

Amir Ben Dror, Niv Zehngut, Avraham Raviv, Evgeny Artyomov, Ran Vitek +1 more
6/17/2021
cs.CV

Official code: LayerFolding/Layer-Folding (14 stars, Python, BSD-3-Clause, last commit 2022-08-08).

Abstract

Despite the increasing prevalence of deep neural networks, their applicability in resource-constrained devices is limited due to their computational load. While modern devices exhibit a high level of parallelism, real-time latency is still highly dependent on networks' depth.

Show full abstract

Although recent works show that below a certain depth, the width of shallower networks must grow exponentially, we presume that neural networks typically exceed this minimal depth to accelerate convergence and incrementally increase accuracy. This motivates us to transform pre-trained deep networks that already exploit such advantages into shallower forms. We propose a method that learns whether non-linear activations can be removed, allowing to fold consecutive linear layers into one. We apply our method to networks pre-trained on CIFAR-10 and CIFAR-100 and find that they can all be transformed into shallower forms that share a similar depth. Finally, we use our method to provide more efficient alternatives to MobileNetV2 and EfficientNet-Lite architectures on the ImageNet classification task.

View on arXivView PDF

Code Implementations(1)

BSD-3-Clause
142PythonMay 26, 20214 years agoBSD-3-Clause

Similar Papers

Cite this paper

@article{dror2021layer,
  title  = {Layer Folding: Neural Network Depth Reduction using Activation Linearization},
  author = {Amir Ben Dror and Niv Zehngut and Avraham Raviv and Evgeny Artyomov and Ran Vitek and Roy Jevnisek},
  year   = {2021},
  eprint = {2106.09309},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2106.09309}
}

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/2106.09309.svg)](https://codeofpaper.com/paper/2106.09309)

Discussion