Xception feature-extracting backbone (no classification head).
Implements the "Extreme Inception" topology from Chollet, "Xception: Deep Learning with Depthwise Separable Convolutions", CVPR 2017 (arXiv:1610.02357). The architecture replaces every Inception module of Inception-v3 with a depthwise separable convolution — the limiting case of an Inception block in which every output channel of the pointwise convolution receives its own independent spatial filter. This makes the cross-channel and spatial correlations fully decoupled, dramatically reducing parameters and FLOPs:
The body is organised into three phases — entry flow (3 blocks, with 1×1 strided residuals and channel doubling from 64 → 728), middle flow (8 identical 728-ch blocks with additive identity shortcuts), and exit flow (1 strided transition block plus two final separable convolutions expanding to 1536 → 2048 channels). Designed for a 299×299 input — the same crop size as Inception-v3 — so the spatial-reduction schedule isolates the depthwise-separable factorisation as the sole source of accuracy improvement.
Parameters
configXceptionConfigxception factory
for the paper-cited configuration.Attributes
configXceptionConfigconv1, conv2nn.Conv2dconv1 carries stride 2.bn1, bn2nn.BatchNorm2dblock1, block2, block3nn.Moduleblock4, …, block11nn.Moduleblock12nn.Moduleconv3, conv4_ExitSepConvbn3, bn4nn.BatchNorm2dconv3 and conv4.avgpoolnn.AdaptiveAvgPool2d(B, 2048, 1, 1).feature_infolist[FeatureInfo]BackboneMixin.Notes
Sub-module attribute names match timm's legacy_xception
layout so that state-dict round-trips are key-compatible with
standard pretrained weight files.
Examples
Build an Xception backbone and run a forward pass at the
native 299×299 resolution:
>>> import lucid
>>> from lucid.models.vision.xception import xception
>>> backbone = xception()
>>> x = lucid.randn(2, 3, 299, 299)
>>> out = backbone(x)
>>> out.last_hidden_state.shape
(2, 2048, 1, 1)