The FULL EfficientNet-B0 — all 16 MBConv blocks, batched forward graph + faithfulness #
Scales EfficientNetRenderPC.lean's representative (stem + 3 MBConv + head) to the real B0
[t,c,n,s,k] spec — 16 MBConv layers — at the batched index N·(c·h·w). Pure enumeration + chaining
of the generic per-block machinery; the only genuinely-new piece is the 4th block shape
(mbExp: expand + stride-1 + no residual, used by stage-5/stage-7 first blocks where ic ≠ oc).
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), head 1×1 (320→1280)→GAP→dense.
Per-block (ic, mid=t·ic, oc, r=⌈ic/4⌉, k, spatial, kind):
b1 32→16 mid32 r8 k3 @112 noExp b9 80→112 mid480 r20 k5 @14 exp(no-resid)
b2 16→24 mid96 r4 k3 112→56 strided b10 112→112 mid672 r28 k5 @14 resid
b3 24→24 mid144 r6 k3 @56 resid b11 112→112 mid672 r28 k5 @14 resid
b4 24→40 mid144 r6 k5 56→28 strided b12 112→192 mid672 r28 k5 14→7 strided
b5 40→40 mid240 r10 k5 @28 resid b13 192→192 mid1152 r48 k5 @7 resid
b6 40→80 mid240 r10 k3 28→14 strided b14 192→192 mid1152 r48 k5 @7 resid
b7 80→80 mid480 r20 k3 @14 resid b15 192→192 mid1152 r48 k5 @7 resid
b8 80→80 mid480 r20 k3 @14 resid b16 192→320 mid1152 r48 k3 @7 exp(no-resid)
Weights of one MBConv6 block (expand ic→mid, depthwise k×k, SE mid→r→mid, project mid→oc).
- eW : Kernel4 mid ic 1 1
- eb : Vec mid
- eε : ℝ
- eγ : Vec mid
- eβ : Vec mid
- dW : DepthwiseKernel mid kh kw
- db : Vec mid
- dε : ℝ
- dγ : Vec mid
- dβ : 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ε : ℝ
- pγ : Vec oc
- pβ : Vec oc
Instances For
All 262 EfficientNet-B0 parameters: stem (3×3-s2 3→32) + 16 MBConv blocks (the real [t,c,n,s,k]
spec) + head (1×1 320→1280) + dense (1280→10).
- sW : Kernel4 32 3 3 3
- sb : Vec 32
- sε : ℝ
- sγ : Vec 32
- sβ : Vec 32
- b1 : MBWNoExp 32 16 8 3 3
- b2 : MBW 16 96 24 4 3 3
- b3 : MBW 24 144 24 6 3 3
- b4 : MBW 24 144 40 6 5 5
- b5 : MBW 40 240 40 10 5 5
- b6 : MBW 40 240 80 10 3 3
- b7 : MBW 80 480 80 20 3 3
- b8 : MBW 80 480 80 20 3 3
- b9 : MBW 80 480 112 20 5 5
- b10 : MBW 112 672 112 28 5 5
- b11 : MBW 112 672 112 28 5 5
- b12 : MBW 112 672 192 28 5 5
- b13 : MBW 192 1152 192 48 5 5
- b14 : MBW 192 1152 192 48 5 5
- b15 : MBW 192 1152 192 48 5 5
- b16 : MBW 192 1152 320 48 3 3
- hW : Kernel4 1280 320 1 1
- hb : Vec 1280
- hε : ℝ
- hγ : Vec 1280
- hβ : Vec 1280
- fcW : Mat 1280 10
- fcb : Vec 10
Instances For
MBConv6 expand, stride-1, NO residual: project-bn ∘ SE ∘ dw-bn-swish ∘ expand-bn-swish (the
mbResidFwdB body without the identity skip).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
MBConv6 expand + stride-1 + no-residual graph (the mbResidGraphB body without the addV skip).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
The full batched EfficientNet-B0 forward graph at the batched index N·(c·h·w): stem → 16
MBConv blocks (the real [t,c,n,s,k] spec, 3×3 and 5×5 depthwise, true batch-norm, squeeze-excite,
4 stride-2 downsamples, identity residuals where s=1 ∧ ic=oc) → head → GAP → dense.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Full batched EfficientNet-B0 forward faithfulness. The full 16-MBConv batched graph (true
batch-norm + SE) denotes efficientnetForwardB_full. Chained from the per-block *GraphW_faithful
lemmas (one rw per block, outermost→innermost), then a structural rfl (the forward is
nested-application form, blocks opaque) — the ResNet34RenderPC recipe at full depth.
The full EfficientNet-B0 has a (correct) VJP. Chained from the per-block gradients (stem → 16
MBConv blocks → head) via vjp_comp. Stated on the ∘-composition of the blocks (= the full
forward by construction; keeps the blocks opaque so the chain closes structurally). The full-depth,
batched, true-batch-norm + SE analogue of efficientnet_has_vjp.
Equations
- One or more equations did not get rendered due to their size.
Instances For
efficientnetForwardB_full = the ∘-chain of the VJP's statement — the
kernel-checked bridge between the nested-application and composition forms,
closing the form-gap this file shipped with. PROOF-SHAPE MATTERS (the ConvNeXt-T
convNextForwardTCh_eq_chain lesson): equation-lemma rw + 17 comp_apply
rewrites close syntactically; a simp/rfl proof of the same statement makes
the kernel reduce the block bodies (no reducibility, no defeq cache) and
deterministically time out.
Public correctness theorem for efficientnetForwardB_full_has_vjp — the full
B0's backward equals the pdiv-contracted Jacobian of efficientnetForwardB_full
itself at every input, tying the chain-stated VJP back to the nested forward via
efficientnetForwardB_full_eq_chain.