DenseNet

Last updated on Feb 12, 2021

Densenet-121

Parameters 8 Million
FLOPs 3 Billion
File Size 30.84 MB
Training Data ImageNet
Training Resources 8x NVIDIA V100 GPUs
Training Time

Training Techniques Weight Decay, SGD with Momentum
Architecture 1x1 Convolution, Average Pooling, Batch Normalization, Convolution, Dense Block, Dropout, Dense Connections, ReLU, Max Pooling, Softmax
ID densenet121
LR 0.1
Epochs 90
LR Gamma 0.1
Momentum 0.9
Batch Size 32
LR Step Size 30
Weight Decay 0.0001
SHOW MORE
SHOW LESS
Densenet-161

Parameters 29 Million
FLOPs 8 Billion
File Size 110.37 MB
Training Data ImageNet
Training Resources 8x NVIDIA V100 GPUs
Training Time

Training Techniques Weight Decay, SGD with Momentum
Architecture 1x1 Convolution, Average Pooling, Batch Normalization, Convolution, Dense Block, Dropout, Dense Connections, ReLU, Max Pooling, Softmax
ID densenet161
LR 0.1
Epochs 90
LR Gamma 0.1
Momentum 0.9
Batch Size 32
LR Step Size 30
Weight Decay 0.0001
SHOW MORE
SHOW LESS
Densenet-169

Parameters 14 Million
FLOPs 3 Billion
File Size 54.71 MB
Training Data ImageNet
Training Resources 8x NVIDIA V100 GPUs
Training Time

Training Techniques Weight Decay, SGD with Momentum
Architecture 1x1 Convolution, Average Pooling, Batch Normalization, Convolution, Dense Block, Dropout, Dense Connections, ReLU, Max Pooling, Softmax
ID densenet169
LR 0.1
Epochs 90
LR Gamma 0.1
Momentum 0.9
Batch Size 32
LR Step Size 30
Weight Decay 0.0001
SHOW MORE
SHOW LESS
Densenet-201

Parameters 20 Million
FLOPs 4 Billion
File Size 77.37 MB
Training Data ImageNet
Training Resources 8x NVIDIA V100 GPUs
Training Time

Training Techniques Weight Decay, SGD with Momentum
Architecture 1x1 Convolution, Average Pooling, Batch Normalization, Convolution, Dense Block, Dropout, Dense Connections, ReLU, Max Pooling, Softmax
ID densenet201
LR 0.1
Epochs 90
LR Gamma 0.1
Momentum 0.9
Batch Size 32
LR Step Size 30
Weight Decay 0.0001
SHOW MORE
SHOW LESS
README.md

Summary

DenseNet is a type of convolutional neural network that utilises dense connections between layers, through Dense Blocks, where we connect all layers (with matching feature-map sizes) directly with each other. To preserve the feed-forward nature, each layer obtains additional inputs from all preceding layers and passes on its own feature-maps to all subsequent layers.

How do I load this model?

To load a pretrained model:

import torchvision.models as models
densenet = models.densenet161(pretrained=True)

Replace the model name with the variant you want to use, e.g. densenet161 You can find the IDs in the model summaries at the top of this page.

To evaluate the model, use the image classification recipes from the library.

python train.py --test-only --model='<model_name>'

How do I train this model?

You can follow the torchvision recipe on GitHub for training a new model afresh.

Citation

@article{DBLP:journals/corr/HuangLW16a,
  author    = {Gao Huang and
               Zhuang Liu and
               Kilian Q. Weinberger},
  title     = {Densely Connected Convolutional Networks},
  journal   = {CoRR},
  volume    = {abs/1608.06993},
  year      = {2016},
  url       = {http://arxiv.org/abs/1608.06993},
  archivePrefix = {arXiv},
  eprint    = {1608.06993},
  timestamp = {Mon, 10 Sep 2018 15:49:32 +0200},
  biburl    = {https://dblp.org/rec/journals/corr/HuangLW16a.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}

Results

Image Classification on ImageNet

Image Classification on ImageNet
MODEL TOP 1 ACCURACY TOP 5 ACCURACY
Densenet-161 77.65% 93.8%
Densenet-201 77.2% 93.57%
Densenet-169 76.0% 93.0%
Densenet-121 74.65% 92.17%