inception_v4(pretrained: bool = False, overrides: object = {})Inception-v4 feature-extracting backbone.
Builds an InceptionV4 with the topology of Szegedy et al.
2017, Figure 9: multi-branch stem → 4× Inception-A → Reduction-A →
7× Inception-B → Reduction-B → 3× Inception-C, ending in an
feature map for a
input. 41.1 M parameters (the published classifier's 42.7 M less
its 1536 → 1000 head).
Model Size
Parameters
pretrainedbool= FalseNo pretrained weights are published for the headless backbone;
True raises NotImplementedError rather than returning
a randomly initialised model. The ImageNet-1k checkpoint belongs
to inception_v4_cls, which the error message names.**overridesobject= {}Keyword overrides forwarded into
InceptionV4Config
(e.g. in_channels).Returns
InceptionV4Backbone with the Inception-v4 configuration applied (or with
overrides merged on top of it).
Notes
See Szegedy et al., "Inception-v4, Inception-ResNet and the Impact of Residual Connections on Learning", AAAI 2017. The paper defines a single network, so there are no size variants (H11).
Examples
>>> import lucid
>>> from lucid.models.vision.inception_v4 import inception_v4
>>> model = inception_v4().eval()
>>> out = model(lucid.randn(1, 3, 299, 299))
>>> out.last_hidden_state.shape
(1, 1536, 8, 8)