Memory-Efficient Implementation of DenseNets

Geoff Pleiss, Danlu Chen, Gao Huang, Tongcheng Li, Laurens van der Maaten +1 more
7/21/2017
cs.CV

Official code: gpleiss/efficient_densenet_pytorch (1,535 stars, MIT, PyTorch, last commit 2023-06-01).

Abstract

The DenseNet architecture is highly computationally efficient as a result of feature reuse. However, a naive DenseNet implementation can require a significant amount of GPU memory: If not properly managed, pre-activation batch normalization and contiguous convolution operations can produce feature maps that grow quadratically with network depth. In this technical report, we introduce strategies to reduce the memory consumption of DenseNets during training. By strategically using shared memory allocations, we reduce the memory cost for storing feature maps from quadratic to linear. Without the GPU memory bottleneck, it is now possible to train extremely deep DenseNets. Networks with 14M parameters can be trained on a single GPU, up from 4M. A 264-layer DenseNet (73M parameters), which previously would have been infeasible to train, can now be trained on a single workstation with 8 NVIDIA Tesla M40 GPUs. On the ImageNet ILSVRC classification dataset, this large DenseNet obtains a state-of-the-art single-crop top-1 error of 20.26%.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

A memory-efficient implementation of DenseNets

1,535319PythonMay 31, 20173 years agoMIT
deep-learningdensenetpytorch

Similar Papers

Cite this paper

@article{pleiss2017memoryefficient,
  title  = {Memory-Efficient Implementation of DenseNets},
  author = {Geoff Pleiss and Danlu Chen and Gao Huang and Tongcheng Li and Laurens van der Maaten and Kilian Q. Weinberger},
  year   = {2017},
  eprint = {1707.06990},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1707.06990}
}

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

Discussion