InceptionResNetConfig
ModelConfigInceptionResNetConfig(num_classes: int = 1000, in_channels: int = 3, dropout: float = 0.2, scale_a: float = 0.17, scale_b: float = 0.1, scale_c: float = 0.2)Configuration for Inception-ResNet v2.
This is the TF-Slim Inception-ResNet-v2 — the network the released checkpoint was trained as — which differs from the paper's figures in three documented ways. All three are dictated by the weights: the tensors in the checkpoint have these shapes and these counts.
Sequential stem, not Figure 3's parallel-branch stem
Fig. 3 draws three filter-concat junctions
({MaxPool | Conv} → {1x1→3x3 | 1x1→7x1→1x7→3x3} →
{Conv | MaxPool}) reaching 35×35×384. TF-Slim instead runs a
plain sequential conv/pool chain into Mixed_5b.
Repeat counts 10 / 20 / 9+1, not Figure 15's 5 / 10 / 5 TF-Slim doubles every stage.
Residual widths 320 / 1088 / 2080, not Figures 16/17/19's
384 / 1154 / 2048
The three Linear 1×1 projections that close each residual block
are sized to TF-Slim's widths.
Layout as built:
- Sequential stem (TF-Slim)
- Mixed_5b (192 → 320)
- 10× Block35 (scale_a, default 0.17)
- Mixed_6a / Reduction-A (320 → 1088)
- 20× Block17 (scale_b, default 0.10)
- Mixed_7a / Reduction-B (1088 → 2080)
- 9× Block8 (scale_c, default 0.20) + 1× Block8 (no ReLU)
- Conv2d_7b 1×1 projection (2080 → 1536)
- AdaptiveAvgPool → Dropout → FC(1536, num_classes)
scale_a — residual scale for Block35 (paper suggests 0.17).
scale_b — residual scale for Block17 (paper suggests 0.10).
scale_c — residual scale for Block8 (paper suggests 0.20).
dropout — head dropout rate (0.2 in the paper).
Examples
>>> from lucid.models.vision.inception_resnet._config import InceptionResNetConfig
>>> cfg = InceptionResNetConfig()
>>> cfg.model_type
'inception_resnet'
>>> cfg.num_classes, cfg.in_channels
(1000, 3)