RegNet (Radosavovic, Kosaraju, Girshick, He and Dollár, 2020) designed design spaces instead of single networks. Starting from a very general space of ResNeXt-like networks, the authors sampled and trained hundreds of models, compared the distributions of their errors, and kept the constraints that made good networks more common. The result is a simple rule: block widths that grow linearly with depth, quantised into a few stages. Its models were competitive with EfficientNet and up to five times faster on GPUs. This page covers design-space thinking, the quantised linear rule, the X and Y blocks, and what the analysis revealed. In the exercises you implement the rule and reproduce four torchvision RegNetX models exactly, from 5.5 M to 15.3 M parameters, from five numbers each.
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.
Find the rule, not just the network
Most architecture papers present one network. The RegNet authors instead asked which rules good networks follow. They generated hundreds of random networks from a very flexible family, trained each briefly, and checked which constraints raised the typical quality of the whole family. Over a few rounds they discovered a simple pattern: good networks get wider steadily as they get deeper. A formula with a handful of numbers now produces a whole range of fast, accurate networks.
Architecture explorer: shapes, parameters and compute
stage
output C × H × W
parameters
multiply–adds
stem
64 × 56 × 56
9.5 k
118.01 M
stage2
256 × 56 × 56
205.8 k
634.22 M
stage3
512 × 28 × 28
1.20 M
1.09 G
stage4
1024 × 14 × 14
7.02 M
1.53 G
stage5
2048 × 7 × 7
14.54 M
865.44 M
head
1000 × 1 × 1
2.05 M
2.05 M
Total: 25,028,904 parameters (25.03 M), 4.23 G multiply–adds per image at 224 × 224.
ResNet-50
25.56 M parameters
4.09 G MACs
ResNeXt-50 (32×4d)
25.03 M parameters
4.23 G MACs
Bars show each row's share of the total. Convolutions dominate compute because they run at every position; fully connected layers dominate parameters in older designs (AlexNet, VGG). Changing the input size changes the compute of every convolution but not its parameters. Parameter counts include biases and BatchNorm scale and shift and match torchvision's implementations.
Why engineers care
RegNets are simple, fast on GPUs and easy to scale to a compute budget, so they are popular backbones for detection and segmentation in robotics and driving. The design-space method also generalises: study families, not single models.
📝 Quick check (Level 0)
0/3 answered
1. RegNet's authors designed…
2. Good networks get…
3. RegNets are notably fast on…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.
By hand
Quantised linear rule:
Block j (0 ≤ j < d) has width u_j = w₀ + w_a·j.
Write u_j = w₀·w_m^(s_j), round s_j to an integer, and quantise the width to a multiple of 8.
Consecutive blocks with equal widths form a stage.
Round each stage width to a multiple of the group width g.
X block: a ResNeXt-style bottleneck with bottleneck ratio 1 (1 × 1, then a grouped 3 × 3 with group width g, then 1 × 1). The Y block adds SE.
Group count: w/g, so 400/16 = 25 groups.
📝 Quick check (Level 1)
0/3 answered
1. u_j for w₀ = 24, w_a = 24.48, j = 21:
2. RegNetY differs from RegNetX by…
3. Groups at width 400, group width 16:
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.
RegNet in code
Exercise 1.
The linear rule gave 22 widths from 24 to 538.
Quantising left four distinct widths, which became four stages of 1, 2, 7 and 12 blocks.
Group rounding then gave 32, 64, 160 and 400.
Practice.
torchvision has regnet_x_* and regnet_y_* from 400MF to 32GF (the name gives the multiply–adds); regnet_y_16gf and regnet_y_32gf have SWAG-pretrained weights.
The training recipe is simple and standard: SGD with momentum 0.9, cosine schedule, weight decay 5·10⁻⁵, 100 epochs, little augmentation. That makes RegNet a clean baseline.
To fit a budget, pick the flops variant, or generate a custom model from (d, w₀, w_a, w_m, g).
model = torchvision.models.regnet_y_800mf(weights="IMAGENET1K_V2")# custom: torchvision.models.regnet.BlockParams.from_init_params(depth=22, w_0=24, w_a=24.48, w_m=2.54, group_width=16)
🐍 Exercise 1: the quantised linear rule
Generate linear widths, quantise them and group equal widths into stages.
📝 Quick check (Level 2)
0/3 answered
1. '400MF' in RegNetX-400MF means…
2. RegNet's training recipe is…
3. torchvision function for custom RegNet parameters:
Level 3: Advanced
★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.
Theory
Design spaces and error distributions. A design space is a parameterised family of networks. The authors compared spaces by sampling about 500 models from each, training each briefly, and plotting the empirical distribution function (EDF) of their errors. A better space has more of its mass at low error. Successive constraints were kept only when the EDF improved:
shared bottleneck ratio;
shared group width;
increasing widths;
increasing depths.
This turned AnyNetX, with about 10¹⁸ configurations, into RegNet, which is far smaller.
What the analysis found.
Good networks’ widths are well fit by a quantised linear function of block index.
The best models had about 20 blocks, fairly independent of compute budget, against the common belief that deeper is better.
A bottleneck ratio of 1 (no bottleneck) was best.
Inverted bottlenecks and depthwise convolutions hurt in this regime.
Runtime on GPUs tracks the number of activations (output elements) better than FLOPs, so RegNets keep activations low.
Comparison. At similar FLOPs RegNetY matched EfficientNet’s accuracy and trained and ran up to five times faster on GPUs, because EfficientNet’s depthwise convolutions and high-resolution maps produce many activations.
📝 Quick check (Level 3)
0/3 answered
1. Design spaces were compared by…
2. Best depth found was about…
3. GPU runtime tracked best with…
Level 4: Expert
★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.
Can five numbers rebuild a network?
History.
I. Radosavovic, J. Johnson, S. Xie, W.-Y. Lo and P. Dollár (2019) introduced design-space comparison with error distributions.
I. Radosavovic, R. P. Kosaraju, R. Girshick, K. He and P. Dollár (2020) introduced RegNet at CVPR.
RegNetY backbones were used in self-supervised models such as SEER (Goyal et al., 2021), trained on a billion uncurated images.
Exercise 2. This is a calculation, not a training run. For four published RegNetX models it generates the stage widths and depths from (d, w₀, w_a, w_m, g), counts the parameters of the resulting networks, and compares with torchvision:
model
stage widths
stage depths
parameters (ours)
torchvision
400MF
32, 64, 160, 400
1, 2, 7, 12
5,495,976
5,495,976
800MF
64, 128, 288, 672
1, 3, 7, 5
7,259,656
7,259,656
1.6GF
72, 168, 408, 912
2, 4, 10, 2
9,190,136
9,190,136
3.2GF
96, 192, 432, 1008
2, 6, 15, 2
15,296,552
15,296,552
Five numbers each reproduce the networks exactly. Widths, depths and every parameter match torchvision.
Widths always increase across stages, one of the constraints the design-space analysis found in good networks. Depths, however, are not monotone (800MF ends with 5 blocks after 7); the analysis favoured increasing depths only on average.
A rounding detail mattered: making 392 divisible by 16 must round halves up (to 400); NumPy’s round-half-to-even gives 384 and a 6% smaller model. Reproducing a published model requires its exact conventions.
🐍 Exercise 2 (research): can five numbers rebuild a network?
Generate RegNetX stage widths and depths from the quantised linear rule and check parameter counts against torchvision.
RegNet in AI, robotics and aerospace
GPU-friendly backbones: RegNets’ low activation counts make them fast on the embedded GPUs used in autonomous vehicles and robots.
Self-supervised pretraining: RegNetY backbones trained on huge unlabelled image sets transfer well to specialised imagery.
Method: evaluating design choices over distributions of models, not single runs, is a sound way to compare options for any onboard model.
References
I. Radosavovic, R. P. Kosaraju, R. Girshick, K. He, P. Dollár (2020). “Designing network design spaces.” Proc. CVPR.
I. Radosavovic, J. Johnson, S. Xie, W.-Y. Lo, P. Dollár (2019). “On network design spaces for visual recognition.” Proc. ICCV.
P. Goyal et al. (2021). “Self-supervised pretraining of visual features in the wild.” arXiv:2103.01988.
Groups in RegNetX-3.2GF’s last stage (1008 wide, group width 48)?
21.
Problem 13Level 2
392 made divisible by 16 with round-half-to-even?
24.5 rounds to 24, giving 384.
Level 3
Problem 14Level 3
Show that the quantised linear rule gives non-decreasing widths.
u_j = w₀ + w_a·j increases with j (w_a > 0). Then s_j = round(log_(w_m)(u_j/w₀)) is non-decreasing, because log is increasing and rounding preserves order (possibly with ties). So w₀·w_m^(s_j) is non-decreasing, and rounding to multiples of 8 and of g also preserves order. ∎
Problem 15Level 3
Explain why comparing design spaces by error distributions is more reliable than comparing best models.
The best model of a space depends on luck in sampling and training noise, and a large space can contain one good model among many bad ones. The empirical distribution of errors over hundreds of sampled models measures how good typical members are and how easily good ones are found. A space whose distribution shifts to lower error is genuinely better to search or tune within. ∎
Problem 16Level 3
Explain why RegNetY can be faster than EfficientNet on GPUs at similar FLOPs.
GPU runtime depends heavily on memory traffic, roughly the number of activations written and read. EfficientNet uses depthwise convolutions (low arithmetic per byte), high input resolutions and wide expanded layers, which create many activations. RegNetY uses grouped convolutions with moderate widths and standard resolution, producing fewer activations for the same FLOPs, so it keeps the GPU’s compute units busier. ∎
Problem 17Level 3
Advise how to pick a backbone for a GPU-equipped autonomous car’s perception stack.
Compare candidates such as RegNetY, ResNet and EfficientNet by measured latency and memory on the car’s GPU at deployment resolution, not by FLOPs. RegNetY variants are a strong default for GPU latency and are easy to scale to the budget. Check accuracy on the driving data after fine-tuning, and validate under the runtime (for example TensorRT) and precision (FP16 or INT8) actually used. ∎
Level 4
Problem 18Level 4
Parameters of RegNetX-800MF?
7259656.
Problem 19Level 4
Approximate depth (blocks) of the best RegNet models, largely independent of budget?
About 20.
Problem 20Level 4
Up to how many times faster than EfficientNet RegNetY ran on GPUs at similar accuracy?
A timed test drawn at random from this topic's question bank. Each attempt gets new questions. For a longer test across the whole chapter, see the chapter test, or mix topics in the question bag.
RegNet: topic test
10 questions, drawn at random from a bank of 21. Every attempt is different.
⏱ Time limit: 15 minutes. The test submits itself when time runs out.
Levels covered: 0, 1, 2, 3, 4. No hints or solutions until you submit.