inplace_abn

A PyTorch-style layer that combines batch normalization and activation while saving memory during deep network training. It lets you train larger models or use bigger batches on the same hardware.

Share on XLicense: BSD-3-Clause

Overview

In-Place Activated BatchNorm (InPlace-ABN) is a PyTorch layer that reduces the memory needed to train deep networks. It treats batch normalization and the following activation as one in-place operation, and drops or recomputes intermediate buffers when needed. The README reports memory savings of up to 50% in architectures such as ResNet, ResNeXt and Wider ResNet. The repository also has ImageNet training scripts and semantic segmentation inference code.

Key features

  • Combines batch norm and activation in one in-place operation
  • Reported memory savings of up to 50% in modern architectures
  • Training scripts to reproduce the paper's ImageNet results
  • Inference code for semantic segmentation with a Mapillary Vistas model

Best for

Deep learning practitioners who hit GPU memory limits when training large networks and want larger models or batches on the same hardware.

Upstream
mapillary/inplace_abn
Fork on GitHub
Guo-astro/inplace_abn
Upstream stars
1.3k
Category
Finance, data and research
Language
Python
License
BSD-3-Clause
Forked
2020-12-05
Sync status
In syncLast synced 2026-09-29