Inception v3 feature-extracting backbone.
Implements the topology from Szegedy et al., "Rethinking the
Inception Architecture for Computer Vision", CVPR 2016: a deep
pre-Inception stem (3×Conv → MaxPool → 2×Conv → MaxPool), three
_InceptionA blocks at , a Reduction-A
block (_InceptionB) down to , four
_InceptionC blocks with factorised and
convolutions, a Reduction-B block
(_InceptionD) down to , two
_InceptionE blocks with the expanded
/ parallel branches, and a final
lucid.nn.AdaptiveAvgPool2d to . Designed
for RGB inputs.
Parameters
configInceptionConfiginception_v3 for the
paper-cited configuration. aux_logits only affects the
classifier variant.Attributes
configInceptionConfigstemnn.Sequentialinception_a0, inception_a1, inception_a2_InceptionAreduction_a_InceptionBinception_c0, inception_c1, inception_c2, inception_c3_InceptionCreduction_b_InceptionDinception_e0, inception_e1_InceptionEavgpoolnn.AdaptiveAvgPool2dfeature_infolist[FeatureInfo]BackboneMixin.Notes
The headline factorisation idea is to replace an convolution with an followed by a convolution: for this trades parameters for while adding an extra ReLU and matching the original receptive field along a separable manifold. Inception v3 uses three block topologies (A, B, C) at three spatial resolutions (35×35, 17×17, 8×8), each tailored to the receptive-field budget at that stage. Approximately 23.8 M parameters (without auxiliary head); achieves a top-5 ImageNet error of 3.5% on the validation set.
Examples
>>> import lucid
>>> from lucid.models.vision.inception import inception_v3
>>> backbone = inception_v3()
>>> x = lucid.randn(1, 3, 299, 299)
>>> out = backbone(x)
>>> out.last_hidden_state.shape # (B, 2048, 1, 1)
(1, 2048, 1, 1)