Skip to content
fn

densenet_201

→DenseNet18.1M
densenet_201(pretrained: bool = False, overrides: object = {})

DenseNet-201 feature-extracting backbone (no classification head).

Builds a DenseNet with the paper-cited DenseNet-201 topology: per-block dense-layer counts (6, 12, 48, 32), growth rate k=32k = 32, initial conv channels 64. Approximately 20.0 M parameters total. Reaches a top-1 ImageNet error of 22.6% (Huang et al., 2017, Table 3).

Model Size

Parameters

pretrainedbool= False
No checkpoint is published for densenet_201, so True raises NotImplementedError rather than return randomly initialised weights. densenet_201_cls is the checkpointed variant.
**overridesobject= {}
Keyword overrides forwarded into DenseNetConfig.

Returns

DenseNet

Backbone with the DenseNet-201 configuration applied (or with overrides merged on top of it).

Notes

See Huang et al., CVPR 2017, Table 1. Final pre-classifier feature width is 1920 channels.

Examples

>>> import lucid
>>> from lucid.models.vision.densenet import densenet_201
>>> model = densenet_201()
>>> x = lucid.randn(1, 3, 224, 224)
>>> out = model(x)
>>> out.last_hidden_state.shape   # (B, 1920, 1, 1)
(1, 1920, 1, 1)

Used by 1