inception_resnet_v2(pretrained: bool = False, overrides: object = {})Inception-ResNet v2 feature-extracting backbone.
Builds an InceptionResNetV2 with the paper-cited Szegedy
2017 topology: 5-conv stem → Mixed_5b → 10× Block35 → Reduction-A
→ 20× Block17 → Reduction-B → 9× Block8 (+ 1 no-ReLU block) →
projection to 1536 channels. Designed for
RGB inputs. Approximately 54.3 M parameters
in the backbone alone.
Model Size
Parameters
pretrainedbool= FalseReserved for future pretrained-weight loading. Currently
ignored — the returned model is randomly initialised.
**overridesobject= {}Keyword overrides forwarded into
InceptionResNetConfig.
Use scale_a / scale_b / scale_c to tune the
residual-branch scaling factors (defaults 0.17 / 0.10 / 0.20
from the paper).Returns
InceptionResNetV2Backbone with the Inception-ResNet v2 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. Top-5 ImageNet validation error of 3.08% (full classifier). No paper-cited size variants (H11) — only v2 is implemented here; v1 differs primarily in widths.
Examples
>>> import lucid
>>> from lucid.models.vision.inception_resnet import inception_resnet_v2
>>> model = inception_resnet_v2()
>>> x = lucid.randn(1, 3, 299, 299)
>>> out = model(x)
>>> out.last_hidden_state.shape # (B, 1536, 1, 1)
(1, 1536, 1, 1)