# mapillary/inplace_abn

In-Place Activated BatchNorm for Memory-Optimized Training of DNNs

Repository: https://github.com/mapillary/inplace_abn
Canonical: https://ross.abutalabs.com/products/inplace_abn
Language: Python
License: BSD-3-Clause
License Family: permissive
Last push: 2026-07-25T00:24:44+00:00

## Health v2 (maintenance only)
Score: 65/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 94, release rhythm 8, longevity 100
- inputs: {"age_days": 3205, "days_push": 40, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1333, forks 183 (observed 2026-08-28T04:04:24.778367+00:00)

## What it is
A PyTorch extension library implementing In-Place Activated BatchNorm (InPlace-ABN), which redefines BN plus nonlinear activation as a single in-place operation to reduce training GPU memory usage by up to 50%. It ships the iABN layer plus training scripts reproducing ImageNet classification and Mapillary Vistas semantic segmentation results.

## Use cases
- reduce GPU memory usage when training deep networks in PyTorch
- train larger ResNet or ResNeXt models on limited GPU memory
- fit bigger batch sizes on a single GPU during CNN training
- fuse batch normalization and activation into one memory-efficient layer
- reproduce memory-optimized ImageNet or semantic segmentation training results

## When to choose
- you train deep CNNs in PyTorch on Linux with CUDA >= 10 and GPU memory is the bottleneck
- you want to increase model size or batch size without upgrading hardware
- you need an invertible BN+activation layer compatible with recomputation-based backpropagation

## When to avoid
- you develop or deploy on non-Linux platforms or older CUDA versions
- you need to transfer weights from networks trained with standard BatchNorm, since the scaling parameterization is incompatible
- you use a framework other than PyTorch or your models are small enough that memory savings do not matter

## Facets
- artifact type: library
- maturity: stable
- function: machine-learning, deep-learning, gpu-computing
- domain: deep-learning, machine-learning, computer-vision, gpu-computing
- platform: python
- tags: pytorch, batch-normalization, memory-optimization, cuda-extension, semantic-segmentation, imagenet, training-efficiency, neural-networks, linux, gpu

## Member repositories
- mapillary/inplace_abn (main) score 65

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:24.778367+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:44:53.710243+00:00, confidence not recorded.
  - readme: https://github.com/mapillary/inplace_abn (fetched 2026-08-28T04:04:24.778367+00:00, sha a02f31295f5f)
  - registry_pypi: https://pypi.org/pypi/inplace_abn/json (fetched 2026-08-29T12:04:02.924596+00:00, sha f48c8067b22d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
