timm documentation

SENet (legacy)

You are viewing main version, which requires installation from source. If you'd like regular pip install, checkout the latest stable version (v1.0.30).
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

SENet (legacy)

Category: CNN · Code: timm/models/senet.py · Architectures: 9 · Pretrained weights: 9 (9 with ImageNet-1k results)

SENet, SE-ResNet and SE-ResNeXt from Cadene’s pretrained models (legacy_*). The module is deprecated in favour of the SE variants of the ResNet class.

Papers

Usage

See the Quickstart for loading pretrained weights, image preprocessing and fine-tuning, and Feature Extraction for using the models as backbones.

>>> import timm
>>> model = timm.create_model('legacy_seresnext50_32x4d.in1k', pretrained=True)
>>> data_config = timm.data.resolve_model_data_config(model)

Model API support

FeatureSENet
features_only=True feature maps✓ (strides 2, 4, 8, 16, 32)
forward_intermediates()✗
prune_intermediate_layers()✗
Any input size, no changes needed✓
set_input_size()–
dynamic_img_size=True–
set_grad_checkpointing()✗
Layer-wise LR decay (group_matcher())✓
reset_classifier()✓

✓ supported, ✓ (square) works for square sizes only, ✗ not supported, – not needed (the model already accepts any input size). Checked by running each feature on a randomly initialized model (SENet with legacy_seresnet18 at 224), other architectures of the same class are expected to behave the same. See the Model API page for details.

Architectures

ArchitectureParams (M)GMACsInput sizePretrained weights
legacy_senet154115.0920.772241
legacy_seresnet1811.781.822241
legacy_seresnet3421.963.672241
legacy_seresnet5028.093.882241
legacy_seresnet10149.337.612241
legacy_seresnet15266.8211.332241
legacy_seresnext26_32x4d16.792.492241
legacy_seresnext50_32x4d27.564.262241
legacy_seresnext101_32x4d48.968.022241

GMACs and parameter counts are for the default input size and classifier of each architecture, from the benchmark results.

Pretrained weights

Top-1 is ImageNet-1k validation accuracy from results-imagenet.csv at the listed eval size, - if the weight has no ImageNet-1k result (e.g. pretraining or image-text weights). Classes is the size of the pretrained classifier, none for weights without one.

WeightInput sizeTop-1 (%)Eval sizeClassesLicenseHub
legacy_senet154.in1k22481.3202241000apache-2.0original
legacy_seresnet18.in1k22471.7422241000apache-2.0original
legacy_seresnet34.in1k22474.7882241000apache-2.0original
legacy_seresnet50.in1k22477.6502241000apache-2.0original
legacy_seresnet101.in1k22478.3702241000apache-2.0original
legacy_seresnet152.in1k22478.6622241000apache-2.0original
legacy_seresnext26_32x4d.in1k22477.1002241000apache-2.0original
legacy_seresnext50_32x4d.in1k22479.0802241000apache-2.0original
legacy_seresnext101_32x4d.in1k22480.2742241000apache-2.0original
Update on GitHub