Skip to content
fn

googlenet

→GoogLeNet
googlenet(pretrained: bool = False, overrides: object = {})

GoogLeNet (Inception v1) feature-extracting backbone.

Builds a GoogLeNet with the paper-cited Szegedy 2015 topology: a Conv-MaxPool stem followed by nine _InceptionModule blocks at three resolutions (28×28 → 14×14 → 7×7) and a final lucid.nn.AdaptiveAvgPool2d to 1×11\times1. 5.60 M parameters in the backbone; googlenet_cls adds the 1000-way head and the two auxiliary classifiers for 13.00 M total, or 6.62 M with aux_logits=False — the figure the reference publishes, since its builder drops the aux heads after loading. Either way, far fewer than AlexNet despite being substantially deeper.

Model Size

Parameters

pretrainedbool= False
No checkpoint is published for googlenet, so True raises NotImplementedError rather than return randomly initialised weights. googlenet_cls is the checkpointed variant.
**overridesobject= {}
Keyword overrides forwarded into GoogLeNetConfig (in_channels, etc.). Auxiliary-classifier fields are irrelevant for the backbone.

Returns

GoogLeNet

Backbone with the GoogLeNet configuration applied (or with overrides merged on top of it).

Notes

See Szegedy et al., "Going Deeper with Convolutions", CVPR 2015 — the ILSVRC-2014 classification winner with a top-5 ImageNet validation error of 6.67%. Single architecture; no paper-cited "tiny / large" variants (H11).

Examples

>>> import lucid
>>> from lucid.models.vision.googlenet import googlenet
>>> model = googlenet()
>>> x = lucid.randn(1, 3, 224, 224)
>>> out = model(x)
>>> out.last_hidden_state.shape
(1, 1024, 7, 7)

Used by 1