gpleiss/efficient_densenet_pytorch
A memory-efficient PyTorch implementation of DenseNet convolutional neural networks for image classification.

This repository provides a PyTorch implementation of DenseNets that reduces GPU memory consumption using gradient checkpointing. Rather than storing intermediate feature maps during the forward pass, the implementation recomputes them during backpropagation. This trades 15-20% extra compute time for linear instead of quadratic memory scaling with network depth. The implementation is based on torchvision’s DenseNet with options to toggle between memory-efficient and speed-optimized modes.