Budgets & global pooling

Defect detection on the line

A production line photographs every part. The classifier must run on the line's own CPU between parts, so it gets a hard compute budget — and the plant may swap in a higher-resolution camera next year without retraining you a new head.

Classify a part as sound or defective inside a 500K-parameter and 50M-FLOP budget. Choose the collapse step that keeps the head independent of image size.

The meter

What this architecture costs

[B, 3, 128, 128]

Parameters

0

FLOPs / example

0

Activations

192 KB

per example

The rack

What you have built

  1. —

    Image input

    [B, 3, 128, 128]

    no weights · 192 KB

Export

This rack, as PyTorch

Every block knows its shapes and its weights, so it knows its own constructor. The result is a plain nn.Module with no dependency on Azimuth — paste it into your notebook.

The checker

What holds so far

60%
  • Shapes chain cleanly

    Every block accepts what the one before it produces.

  • Produces the required output

    Needs [B, 2] · rack currently ends at [B, 3, 128, 128]

  • Uses the blocks this idea needs

    Still missing: Conv2D, Classifier head

  • Within the size budget

    0 of 500K budget

  • Within the compute budget

    0 of 50M budget

Shelf

Blocks available

Sources

Core layers

Reshaping

Normalization & regularization

Activations

Heads

Dials

No block selected

Pick a block on the rack to tune its dials and read what it does.