DenseNet-161 feature-extracting backbone (no classification head).
Builds a DenseNet with the paper-cited DenseNet-161
topology: per-block dense-layer counts (6, 12, 36, 24), growth
rate , initial conv channels 96. Approximately
28.7 M parameters — the widest of the ImageNet DenseNets. Reaches
a top-1 ImageNet accuracy of 77.14% (torchvision weights).
Model Size
Parameters
pretrainedbool= False**overridesobject= {}DenseNetConfig.Returns
DenseNetBackbone with the DenseNet-161 configuration applied (or with
overrides merged on top of it).
Notes
See Huang et al., "Densely Connected Convolutional Networks", CVPR 2017, Table 1. Unlike the k=32 / 64-stem siblings, DenseNet-161 widens the growth rate to 48 and the stem to 96 channels, giving the highest accuracy of the four canonical ImageNet variants at the cost of ~3.6× the parameters of DenseNet-121.
Examples
>>> import lucid
>>> from lucid.models.vision.densenet import densenet_161
>>> model = densenet_161()
>>> x = lucid.randn(1, 3, 224, 224)
>>> out = model(x)
>>> out.last_hidden_state.shape # (B, 2208, 1, 1)
(1, 2208, 1, 1)