All models

densenet (MMPretrain)

Convolutional blocks where every layer sees the concatenated outputs of all layers before it.

Image classification · 22 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (35 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Family
DenseNet
Parameters
508.2K
Operations
22
Framework
PyTorch
Recurrent
No
Source
timm 1.0.30
Name in source
mmpretrain:densenet
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m6965
Graph hash
112b5bc536d734fea6d3f9544eb5073f6b3d5fda39e6e03a12136bb1a4df8123
Skeleton hash
a39563957db775aeb29f709fe62361b857b13c774ba51ceb691f3b0a6ce63a9c
Architecture hash
820482e5e6819494ac353ff873926369a01ec685d00d6361cfdcd4c33cbc9fc1
Diagram SHA-256
84568017ff8f847fa6b58bc5e5ef6b61051539b8f4021f4f506cae39c95e3d7b
TorchLens version
2.35.3
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

menagerie.classics.wave_b_openmmlab:build_mmpretrain: build({})

What it is

About this model's family

DenseNet, the Dense Convolutional Network, connects each layer to every other layer in a feed-forward fashion. Where a traditional network with L layers has L connections, a dense block has L(L+1)/2: each layer takes the feature maps of all preceding layers as input and hands its own to every later layer. Features are combined by concatenation rather than summation, which is the difference from a ResNet. The paper credits this with easing the vanishing-gradient problem, strengthening feature propagation, encouraging feature reuse and cutting the number of parameters.

Because concatenation only works at one feature-map size, the network is divided into dense blocks joined by transition layers that do convolution and pooling. Each layer adds only k feature maps, the growth rate, and the paper shows that a relatively small growth rate is enough. The ImageNet models are the DenseNet-BC form: a 1x1 bottleneck convolution before each 3x3, and transition layers that halve the channel count with compression factor 0.5. All of them use growth rate k = 32.

The captured members are DenseNet-121, 169, 201 and 264 from timm and torchvision, plus timm's DenseNet Blur variant, a DenseNet-121 with blur pooling and a three-layer 3x3 stem. On the ImageNet validation set the paper reports single-crop top-1 error of 25.02 for DenseNet-121, 23.80 for 169, 22.58 for 201 and 22.15 for 264.

Key idea. Dense connectivity: every layer in a block receives the concatenated feature maps of all earlier layers, so features are reused instead of relearned and the network stays narrow.

  • densenet
  • dense convolutional network
  • densenet121
  • densenet169
  • densenet201
  • densenet264
  • densenetblur
  • image classification
  • imagenet
  • dense block

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.