timm documentation

ReXNet

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

ReXNet

Category: Efficient/Mobile · Code: timm/models/rexnet.py · Architectures: 10 · Pretrained weights: 9 (7 with ImageNet-1k results)

ReXNet revises the channel configuration of inverted residual networks to reduce representational bottlenecks. The rexnetr_* variants round the channels to multiples of 8.

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('rexnet_300.nav_in1k', pretrained=True)
>>> data_config = timm.data.resolve_model_data_config(model)

Model API support

FeatureRexNet
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 (RexNet with rexnet_100 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
rexnet_1004.800.412241
rexnet_1307.560.682241
rexnet_1509.730.902241
rexnet_20016.371.562241
rexnet_30034.713.442241
rexnetr_1004.880.432240
rexnetr_1307.610.682240
rexnetr_1509.780.892240
rexnetr_20016.521.592242
rexnetr_30034.813.392242

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.

Weights are grouped by source: the paper or origin given in the pretrained config, else a Hub organization other than timm, else the first part of the pretrained tag (architecture.tag). Sources with a single weight are listed under other.

nav tags

WeightInput sizeTop-1 (%)Eval sizeClassesLicenseHub
rexnet_100.nav_in1k22477.8622241000mittimm
rexnet_130.nav_in1k22479.4922241000mittimm
rexnet_150.nav_in1k22480.3222241000mittimm
rexnet_200.nav_in1k22481.6362241000mittimm
rexnet_300.nav_in1k22482.7802241000mittimm

sw tags

WeightInput sizeTop-1 (%)Eval sizeClassesLicenseHub
rexnetr_200.sw_in12k224 (test 288)--11821apache-2.0timm
rexnetr_200.sw_in12k_ft_in1k224 (test 288)83.1602881000apache-2.0timm
rexnetr_300.sw_in12k224 (test 288)--11821apache-2.0timm
rexnetr_300.sw_in12k_ft_in1k224 (test 288)84.5822881000apache-2.0timm
Update on GitHub