zfnet_cls(pretrained: bool = False, overrides: object = {})ZFNet image classifier (backbone + FC6 + FC7 + linear head).
Builds a ZFNetForImageClassification with the paper-cited
Zeiler & Fergus 2014 topology and the AlexNet-style two-layer
4096-dim FC head. Approximately 62 M parameters total. Achieves
a top-5 ImageNet-1k validation error of 11.7% in the original
paper.
Model Size
Parameters
pretrainedbool= FalseReserved for future pretrained-weight loading. Currently
ignored.
**overridesobject= {}Keyword overrides forwarded into
ZFNetConfig. Use
num_classes=N to retarget the head and dropout=p to
adjust regularisation.Returns
ZFNetForImageClassificationClassifier with the ZFNet configuration applied (or with
overrides merged on top of it).
Notes
See Zeiler & Fergus, "Visualizing and Understanding Convolutional Networks", ECCV 2014, §3. The classifier head is identical to AlexNet's by design.
Examples
>>> import lucid
>>> from lucid.models.vision.zfnet import zfnet_cls
>>> model = zfnet_cls()
>>> x = lucid.randn(2, 3, 224, 224)
>>> out = model(x)
>>> out.logits.shape
(2, 1000)