The FULL EfficientNet-B0 at INFERENCE — all 16 MBConv blocks, eval forward + graph + faithfulness #
The eval twin of EfficientNetFullB0.lean. That file states the sixteen-block [t,c,n,s,k] net at
TRAINING BatchNorm (bnBatchLA), the world its VJP and its typed graph live in; this file states
the same ladder at INFERENCE BatchNorm — frozen running statistics at all 49 sites, one shared
ε, as the shipped efficientnet_fwd_eval does — and proves
its typed SHlo graph denotes it — T2 at inference BatchNorm for the paper net, the graph of
efficientnet_fwd_eval.mlir and its 1000-class twin. (Built 2026-09-05 so the whole-net float
budget could end at a graph; the budget was deleted 2026-09-08 and the graph statement stays —
planning/archive/proofs_tier_to_paper_nets.md 3.3(e).)
Pure enumeration and chaining of EfficientNetRenderPCEval.lean's per-block machinery, at the
batched index N·(c·h·w) and generic in the class count. The one genuinely new piece is the
fourth block shape at inference — mbExpFwdBEval / mbExpGraphBEval: expand, stride 1, no
residual (ic ≠ oc; the stage-5 and stage-7 first blocks b9/b16) — which the three-block
representative has no instance of and EfficientNetFullB0.lean added at training BN as mbExpFwdB.
What it is tied to. efficientnet_fwd_eval.mlir is THIS net: %x plus 213 parameters (the
render folds each conv bias into the BatchNorm that follows it, so %sb/%b1db/… have no slot)
plus 98 statistic slots — 312 inputs at ten classes, and efficientnetin_fwd_eval.mlir its
1000-class twin. ⚠ The typed graph below inherits the three-block eval graph's SSA names, and
they differ from the artifact's in four ways, none of which enters den (names are
pretty-printing metadata): the graph carries a bias slot per conv ("%sb", s!"%{p}db", …) that
the render folds away; it names the statistic slots %smu/%svar, %b{k}{e,d,p}mu/var,
%hmu/%hvar where the artifact has %stnmu/%stnvar, %b{k}{e,d,p}nmu/nvar,
%hnmu/%hnvar; it names the SE denses zWa/zba/zWb/zbb where the artifact has
zW1/zb1/zW2/zb2; and its classifier is %Wfc/%bfc where the artifact's is %Wd/%bd. The
den-level statement is what the number needs; matching the text is a separate, cosmetic pass
over EfficientNetRenderPCEval.lean.
B0 stage spec [t,c,n,s,k]: s1 (1,16,1,1,3) s2 (6,24,2,2,3) s3 (6,40,2,2,5) s4 (6,80,3,2,3)
s5 (6,112,3,1,5) s6 (6,192,4,2,5) s7 (6,320,1,1,3); stem 3×3/s2 (3→32) at the XLA-SAME phase,
head 1×1 (320→1280) → GAP → dense.
MBConv6 expand, stride 1, no residual, at inference — mbResidFwdBEval's body without the
skip (the eval twin of mbExpFwdB).
Equations
- One or more equations did not get rendered due to their size.
Instances For
MBConv6 expand + stride-1 + no-residual inference graph — mbResidGraphBEval without the
addV skip.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Weights and running statistics of one MBConv6 block at inference.
- eW : Kernel4 mid ic 1 1
- eb : Vec mid
- eγ : Vec mid
- eβ : Vec mid
- eμ : Vec mid
- ev : Vec mid
- dW : DepthwiseKernel mid kh kw
- db : Vec mid
- dγ : Vec mid
- dβ : Vec mid
- dμ : Vec mid
- dv : Vec mid
- z1 : Mat mid r
- zb1 : Vec r
- z2 : Mat r mid
- zb2 : Vec mid
- pW : Kernel4 oc mid 1 1
- pb : Vec oc
- pγ : Vec oc
- pβ : Vec oc
- pμ : Vec oc
- pv : Vec oc
Instances For
Weights and running statistics of the MBConv1 block (t = 1, no expand) at inference.
- dW : DepthwiseKernel ic kh kw
- db : Vec ic
- dγ : Vec ic
- dβ : Vec ic
- dμ : Vec ic
- dv : Vec ic
- z1 : Mat ic r
- zb1 : Vec r
- z2 : Mat r ic
- zb2 : Vec ic
- pW : Kernel4 oc ic 1 1
- pb : Vec oc
- pγ : Vec oc
- pβ : Vec oc
- pμ : Vec oc
- pv : Vec oc
Instances For
All of EfficientNet-B0's parameters and running statistics at inference: stem (3×3/s2 3→32)
- 16 MBConv blocks (the real
[t,c,n,s,k]spec,B0Weights's widths) + head (1×1 320→1280) - dense (1280→
nCls). 49 BatchNorm sites, each withμ/v.
- sW : Kernel4 32 3 3 3
- sb : Vec 32
- sγ : Vec 32
- sβ : Vec 32
- sμ : Vec 32
- sv : Vec 32
- b1 : MBWNoExpEval 32 16 8 3 3
- b2 : MBWEval 16 96 24 4 3 3
- b3 : MBWEval 24 144 24 6 3 3
- b4 : MBWEval 24 144 40 6 5 5
- b5 : MBWEval 40 240 40 10 5 5
- b6 : MBWEval 40 240 80 10 3 3
- b7 : MBWEval 80 480 80 20 3 3
- b8 : MBWEval 80 480 80 20 3 3
- b9 : MBWEval 80 480 112 20 5 5
- b10 : MBWEval 112 672 112 28 5 5
- b11 : MBWEval 112 672 112 28 5 5
- b12 : MBWEval 112 672 192 28 5 5
- b13 : MBWEval 192 1152 192 48 5 5
- b14 : MBWEval 192 1152 192 48 5 5
- b15 : MBWEval 192 1152 192 48 5 5
- b16 : MBWEval 192 1152 320 48 3 3
- hW : Kernel4 1280 320 1 1
- hb : Vec 1280
- hγ : Vec 1280
- hβ : Vec 1280
- hμ : Vec 1280
- hv : Vec 1280
- fcW : Mat 1280 nCls
- fcb : Vec nCls
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
The sixteen-block EfficientNet-B0 inference forward — efficientnetForwardB_full's ladder
with frozen running statistics at all 49 BatchNorm sites, at one shared ε. Nested-application
form (NOT ∘), as the training twin, so the faithfulness proof closes by rw and rfl.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
The sixteen-block EfficientNet-B0 inference forward graph at the batched index
N·(c·h·w): stem → 16 MBConv blocks → head → GAP → dense, every one of the 49 BatchNorm sites
reading frozen running statistics through the bnEval descriptor. The eval twin of
efficientnetFwdGraphB_full, and the typed form of the shipped efficientnet_fwd_eval.
Equations
- One or more equations did not get rendered due to their size.
Instances For
⭐ Sixteen-block inference EfficientNet-B0 forward faithfulness. The typed graph denotes
efficientnetForwardB_fullEval: one rw per block with the *GraphEvalW_faithful lemmas
(outermost → innermost), then a structural rfl — the training twin's recipe.