Skip to content
StackDecode
AI & ML Atlas
Deep LearningarchitectureInteractive simulation

DenseNet

Every layer receives the feature maps of all earlier layers in its block.

The idea

Instead of adding, DenseNet concatenates: layer ℓ takes the outputs of every previous layer in the block as input. Features are reused, gradients flow easily and each layer can be narrow (a small "growth rate"), so it achieves good accuracy with fewer parameters.

Watch it run

This is a real computation, not a drawing. Pause, step, change the settings, or try new random data.

Plain deep networkWith skip connections (ResNet)out12345678910111213141516171819in
  • plain
  • with skip connections

The learning signal (gradient) starts at the output and travels backwards through 20 layers. Bar height shows its size at each layer on a log scale.

layers back:
0
1/7

A residual block computes x + F(x). The "+ x" is a shortcut the gradient can travel along.

Step by step

  1. 1Within a dense block, concatenate all previous feature maps.
  2. 2Apply batch norm, ReLU and a convolution to produce k new maps.
  3. 3Append them to the running stack.
  4. 4Between blocks, use a transition layer (1×1 convolution and pooling) to compress.

Where it is used

Parameter-efficient image classification and medical imaging.

Watch out for

Memory use is high because many feature maps are kept.

Related