Skip to content
fn

densenet_264_cls

→DenseNetForImageClassification33.3M
densenet_264_cls(pretrained: bool = False, overrides: object = {})

DenseNet-264 image classifier (backbone + GAP + linear head).

Builds a DenseNetForImageClassification with the paper-cited DenseNet-264 topology and a lucid.nn.Linear classifier projecting 2688 → config.num_classes. Approximately 33.3 M parameters; the deepest DenseNet evaluated in the paper, with a top-1 ImageNet error of 22.2% (Huang et al., 2017, Table 3).

Model Size

Parameters

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

Returns

DenseNetForImageClassification

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

Examples

>>> import lucid
>>> from lucid.models.vision.densenet import densenet_264_cls
>>> model = densenet_264_cls()
>>> x = lucid.randn(1, 3, 224, 224)
>>> out = model(x)
>>> out.logits.shape
(1, 1000)

Used by 1