Skip to content
fn

inception_v3

→InceptionV3
inception_v3(pretrained: bool = False, overrides: object = {})

Inception v3 feature-extracting backbone.

Builds an InceptionV3 with the paper-cited Szegedy 2016 topology: deep stem → 3× Inception-A → Reduction-A → 4× Inception-C → Reduction-B → 2× Inception-E → 1×11\times1 global pool. Designed for 299×299299\times299 RGB inputs. Approximately 21.8 M parameters in the backbone alone.

Model Size

Parameters

pretrainedbool= False
No checkpoint is published for inception_v3, so True raises NotImplementedError rather than return randomly initialised weights. inception_v3_cls is the checkpointed variant.
**overridesobject= {}
Keyword overrides forwarded into InceptionConfig. Note that aux_logits only affects the classifier variant.

Returns

InceptionV3

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

Notes

See Szegedy et al., "Rethinking the Inception Architecture for Computer Vision", CVPR 2016. Top-5 ImageNet validation error in the paper is 3.5% (full classifier). Single architecture; no paper-cited size variants (H11).

Examples

>>> import lucid
>>> from lucid.models.vision.inception import inception_v3
>>> model = inception_v3()
>>> x = lucid.randn(1, 3, 299, 299)
>>> out = model(x)
>>> out.last_hidden_state.shape   # (B, 2048, 1, 1)
(1, 2048, 1, 1)

Used by 1