Foundations to Frontier
Tests
E. Deep Learning › E8 CNN Architectures (one page each)

EfficientNet / EfficientNetV2

EfficientNet (Tan and Le, 2019) asked how to scale a network up. Rather than making it only deeper, wider or higher-resolution, it scales all three together with fixed ratios, depth α^φ, width β^φ and resolution γ^φ with α·β²·γ² ≈ 2, starting from a small searched baseline, B0. EfficientNet-B7 reached 84.3% ImageNet accuracy while being 8.4 times smaller than the best previous model. EfficientNetV2 (2021) added fused-MBConv blocks and progressive learning to train up to 11 times faster. This page covers MBConv blocks, compound scaling, the B0–B7 family and V2's changes. In the exercises you implement the scaling and rounding rules, then compare the rule with the released models: it matches B5–B7's compute within 3% but overestimates B2–B4 (B3 by half), because the published small models were scaled less.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Grow a network in a balanced way

If you have more compute, how should you spend it: more layers, wider layers, or bigger input images? EfficientNet’s answer is all three, in fixed proportions. A deeper network needs a bigger image to have something to look at, and a bigger image needs wider layers to capture its details. Starting from a small, carefully searched network (B0), each step up the family adds about twice the compute, split between depth, width and resolution in a ratio found once by a small grid search.

CNN building blocks
parameters (no bias): standard 73,728 · grouped (g = 1) 73,728 · depthwise separable 8,768 (8.4× fewer) · multiply–adds per image: 231.2 M vs 27.5 M
Deep-learning "convolution" slides a small learned kernel over the input (no flip). Stride shrinks the output, padding preserves borders, dilation spreads the kernel to see further without more weights. Pooling summarises windows. Stacking layers grows the receptive field. Depthwise-separable and grouped convolutions cut cost by not connecting every input channel to every output channel. Transposed convolution upsamples, but uneven kernel overlap leaves checkerboard patterns. Squeeze-and-excitation rescales whole channels by gates computed from their global averages; CBAM adds a per-pixel spatial gate. (Here the gates are fixed functions of the averages so you can see their effect; in a network the excitation is learned.)
Why engineers care

EfficientNets give a ladder of models (B0 to B7) with predictable cost, so engineers can pick the most accurate one that fits a drone’s, satellite’s or phone’s budget. EfficientNet-Lite variants are tuned for edge accelerators.

📝 Quick check (Level 0)
0/3 answered
  1. 1. EfficientNet scales…
  2. 2. Each step up the family roughly…
  3. 3. The baseline B0 was found by…

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

By hand

  • Compound scaling: depth d = α^φ, width w = β^φ, resolution r = 224·γ^φ, with α = 1.2, β = 1.1 and γ = 1.15 found by grid search at φ = 1.
  • Why the constraint: convolution FLOPs scale as d·w²·r², so they grow by (α·β²·γ²)^φ = 1.92^φ, roughly doubling per step.
  • MBConv block: MobileNetV2’s inverted residual with SE (ratio 0.25 of the block’s input width) and swish. For 16 → 24 channels with expansion 6 and a 3 × 3 kernel it has 1,536 + 864 + 868 + 2,304 = 5,572 weights.
  • Rounding:
    • channels are scaled by w and rounded to a multiple of 8, so 40 channels at w = 1.4 become 56;
    • block counts are scaled by d and rounded up, so 3 blocks at d = 3.1 become 10.
  • Family:
    • B0: 5.3 M parameters, 0.39 G FLOPs, 77.1% top-1;
    • B7: 66 M parameters, 37 G FLOPs, 600 × 600 input, 84.3% top-1.
📝 Quick check (Level 1)
0/3 answered
  1. 1. α·β²·γ² with α = 1.2, β = 1.1, γ = 1.15:
  2. 2. FLOPs scale with width as…
  3. 3. 40 channels at width 1.4, rounded to a multiple of 8:

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.

EfficientNet in code

Exercise 1.

  • The MBConv parameter counts matched the formula with and without expansion.
  • The rounding rules gave a 64-channel stem and 10 blocks for a 3-block stage in B7.

Practice.

  • torchvision has efficientnet_b0 to b7 (B0 has 5,288,548 parameters) and efficientnet_v2_s/m/l.
  • Use each model’s native resolution; the transforms bundled with the pretrained weights resize correctly.
  • Training recipe:
    • RMSProp with decay 0.9 and momentum 0.9, weight decay 10⁻⁵;
    • learning rate 0.256 for batch 4,096, decayed by 0.97 every 2.4 epochs;
    • AutoAugment, stochastic depth (survival probability 0.8), and dropout rising from 0.2 (B0) to 0.5 (B7).
  • EfficientNetV2:
    • fused-MBConv, which replaces the expansion 1 × 1 and the depthwise 3 × 3 by one regular 3 × 3 in early stages, faster on accelerators;
    • progressive learning: train with small images and weak regularisation first, then larger images and stronger regularisation.
model = torchvision.models.efficientnet_b0(weights="IMAGENET1K_V1")      # 224 x 224
model2 = torchvision.models.efficientnet_v2_s(weights="IMAGENET1K_V1")   # 384 x 384 at test
🐍 Exercise 1: MBConv and scaling rules
Count MBConv parameters and implement EfficientNet's channel and depth rounding.
📝 Quick check (Level 2)
0/3 answered
  1. 1. Fused-MBConv replaces…
  2. 2. Progressive learning increases during training…
  3. 3. EfficientNet's dropout grows from B0 to B7 because…

Level 3: Advanced

★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.

Theory

Why scale jointly. In the paper’s single-dimension experiments:

  • scaling only width, only depth or only resolution each improved accuracy at first but saturated near 80%;
  • scaling depth with resolution fixed, or resolution with width fixed, helped less than scaling them together.

Intuitively, higher resolution needs more depth to enlarge the receptive field and more width to capture finer patterns.

How α, β and γ were chosen.

  1. With φ = 1 (twice the compute), a small grid search on B0 found α = 1.2, β = 1.1, γ = 1.15.
  2. The ratio was then held fixed for all larger φ, avoiding a costly search at every size.

The baseline matters. B0 was found by a MnasNet-like search that maximised accuracy × (FLOPs/400 M)^−0.07. Scaling a good small network beats scaling a hand-designed one: the same compound scaling applied to MobileNets and ResNets also helped, but less.

Limits.

  • FLOPs are not latency. Depthwise convolutions and SE run slowly on GPUs and TPUs, and large EfficientNets need a lot of activation memory at high resolution.
  • EfficientNetV2 addressed training speed with fused-MBConv, smaller expansion ratios and progressive resizing, giving models up to 11 times faster to train.
📝 Quick check (Level 3)
0/3 answered
  1. 1. Scaling a single dimension…
  2. 2. α, β, γ were searched at…
  3. 3. EfficientNetV2 mainly improved…

Level 4: Expert

★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.

Does the published family follow its own rule?

History.

  • M. Tan and Q. Le (2019) introduced EfficientNet at ICML. B7 reached 84.3% top-1, 8.4 times smaller and 6.1 times faster than the previous best (GPipe).
  • M. Tan and Q. Le (2021) introduced EfficientNetV2 at ICML.
  • EfficientDet (M. Tan, R. Pang and Q. Le, 2020) applied compound scaling to detection.

Exercise 2. This is a calculation, not a training run. For B0–B7 it compares three things:

  • the released width, depth and resolution coefficients;
  • the compound rule’s predictions, with α = 1.2, β = 1.1, γ = 1.15 and φ = 0–7;
  • the compute growth over B0: the simple d·w²·r² estimate, the rule’s 1.92^φ, and the paper’s reported FLOPs.
model released (w, d, r) rule (w, d, r) FLOPs × B0: d·w²·r² rule paper
B1 1.0, 1.1, 240 1.10, 1.20, 258 1.3 1.9 1.8
B2 1.1, 1.2, 260 1.21, 1.44, 296 2.0 3.7 2.6
B3 1.2, 1.4, 300 1.33, 1.73, 341 3.6 7.1 4.6
B4 1.4, 1.8, 380 1.46, 2.07, 392 10.2 13.6 10.8
B5 1.6, 2.2, 456 1.61, 2.49, 451 23.3 26.1 25.4
B6 1.8, 2.6, 528 1.77, 2.99, 518 46.8 50.1 48.7
B7 2.0, 3.1, 600 1.95, 3.58, 596 89.0 96.3 94.9
  • For B5–B7 the rule predicts the paper’s compute within 3%.
  • For B2–B4 the released models are smaller than the rule: B3 has width 1.2 and depth 1.4, not 1.33 and 1.73, so the rule overestimates its compute by half. The family follows the rule’s spirit more than its letter.
  • The simple d·w²·r² estimate falls short for small models (1.3 against 1.8 for B1), because channels and depths are rounded up and the stem and head do not scale the same way.
  • Accuracy is not computed here. The paper’s evidence for compound scaling is its comparison against single-dimension scaling at equal FLOPs.
🐍 Exercise 2 (research): does the family follow its own rule?
Compare EfficientNet's released scaling coefficients and FLOPs with the compound-scaling rule.

EfficientNet in AI, robotics and aerospace

  • Budgeted deployment: pick the largest EfficientNet (or EfficientNet-Lite) variant that meets the latency and memory budget of a drone or satellite processor.
  • Detection: EfficientDet brings compound scaling to object detection, used for aerial and driving datasets.
  • Remote sensing: EfficientNet backbones are common in land-cover and crop classification from satellite imagery.

References

  1. M. Tan, Q. V. Le (2019). “EfficientNet: rethinking model scaling for convolutional neural networks.” Proc. ICML.
  2. M. Tan, Q. V. Le (2021). “EfficientNetV2: smaller models and faster training.” Proc. ICML.
  3. M. Tan, R. Pang, Q. V. Le (2020). “EfficientDet: scalable and efficient object detection.” Proc. CVPR.