Skip to content
fn

xception

→Xception20.8M
xception(pretrained: bool = False, overrides: object = {})

Xception feature-extracting backbone (no classification head).

Builds an Xception with the paper-cited "Extreme Inception" topology from Chollet, 2017: a 2-conv stem, three entry-flow blocks (1×1 strided residuals with channel progression 64 → 128 → 256 → 728), eight middle-flow blocks at 728 channels, one exit-flow transition block (728 → 1024), and two final separable convolutions expanding to 1536 → 2048 channels. 20.8M parameters without a classifier head (xception_cls adds 2.05M more for the 1000-way head, reaching the 22,855,952 the paper reports) — the same budget as Inception-v3 but with depthwise separable convolutions throughout.

Model Size

Parameters

pretrainedbool= False
No checkpoint is published for xception, so True raises NotImplementedError rather than return randomly initialised weights. xception_cls is the checkpointed variant.
**overridesobject= {}
Keyword overrides forwarded into XceptionConfig (e.g. in_channels=1 for grayscale input).

Returns

Xception

Backbone with the canonical Xception configuration applied (or with overrides merged on top of it).

Notes

See Chollet, "Xception: Deep Learning with Depthwise Separable Convolutions", CVPR 2017 (arXiv:1610.02357). Designed for 299×299 input — the same crop as Inception-v3 — so the spatial-reduction schedule isolates the depthwise-separable factorisation as the sole source of accuracy improvement.

Examples

>>> import lucid
>>> from lucid.models.vision.xception import xception
>>> model = xception()
>>> x = lucid.randn(1, 3, 299, 299)
>>> out = model(x)
>>> out.last_hidden_state.shape
(1, 2048, 10, 10)

Used by 1