SK-ResNet-34 feature-extracting backbone (no classification head).
Builds an SKNet with ResNet-34 topology
(_SelectiveKernelBasic blocks stacked [3, 4, 6, 3]).
Only the first of each basic block is a
Selective Kernel unit; the second stays a plain conv-BN-act.
Approximately 21.8M parameters.
Model Size
Parameters
pretrainedbool= FalseNo checkpoint is published for
sk_resnet_34, so True raises
NotImplementedError rather than return randomly initialised weights.
sk_resnet_34_cls is the checkpointed variant.**overridesobject= {}Keyword overrides forwarded into
SKNetConfig.Returns
SKNetBackbone with the SK-ResNet-34 configuration applied (or
with overrides merged on top of it).
Notes
See Li et al., "Selective Kernel Networks", CVPR 2019 (arXiv:1903.06586).
Examples
>>> import lucid
>>> from lucid.models.vision.sknet import sk_resnet_34
>>> model = sk_resnet_34()
>>> x = lucid.randn(1, 3, 224, 224)
>>> out = model(x)
>>> out.last_hidden_state.shape
(1, 512, 7, 7)