Skip to content
fn

densenet_169

→DenseNet12.5M
densenet_169(pretrained: bool = False, overrides: object = {})

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

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

Model Size

Parameters

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

Returns

DenseNet

Backbone with the DenseNet-169 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 1664 channels.

Examples

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

Used by 1