GoogLeNet (Inception v1) feature-extracting backbone.
Implements the 22-layer Inception v1 network from Szegedy et al.,
"Going Deeper with Convolutions", CVPR 2015: a five-block stem
(Conv stride-2 → MaxPool → →
→ MaxPool) followed by nine
_InceptionModule blocks grouped into three stages
(Inception 3a-3b → MaxPool → 4a-4e → MaxPool → 5a-5b) and a final
lucid.nn.AdaptiveAvgPool2d to a spatial
map. Every convolution is batch-normalised, matching the canonical
distributed ImageNet checkpoint. The two auxiliary classifiers
attached at Inception 4a and 4d in the original paper are part of
the classifier variant only, not the backbone.
Parameters
configGoogLeNetConfiggooglenet for the
paper-cited configuration; pass a custom config to switch input
channel count. aux_logits is irrelevant for the backbone.Attributes
configGoogLeNetConfigconv1, conv2, conv3_BasicConv2dmaxpool1, maxpool2_CeilMaxPool2dinception3a, inception3b_InceptionModuleinception4a … inception4e_InceptionModuleinception5a, inception5b_InceptionModulemaxpool3, maxpool4_CeilMaxPool2davgpoolnn.AdaptiveAvgPool2dfeature_infolist[FeatureInfo]BackboneMixin.Notes
Each _InceptionModule computes four parallel branches in a
single layer:
The bottlenecks before the larger spatial convolutions keep the parameter count manageable: GoogLeNet has only ≈6.8 M parameters compared with ≈60 M for AlexNet, despite being substantially deeper and reaching a top-5 ImageNet validation error of 6.67%. This was the ILSVRC-2014 classification winner.
Examples
Build a GoogLeNet backbone and run a single forward pass:
>>> import lucid
>>> from lucid.models.vision.googlenet import googlenet
>>> backbone = googlenet()
>>> x = lucid.randn(2, 3, 224, 224)
>>> out = backbone(x)
>>> out.logits.shape # (B, 1024, 1, 1)
(2, 1024, 1, 1)