MobileNetV4-Conv-M at batch BatchNorm — the whole net's forward and graph #
MobileNetV4BackB0.lean is the block and stage level — every UIB family, the stride-2 form, the
fused stage, the head, the table-driven k = 0 dispatch and the row-typed UibParams. This file is
the net level: a net-level ℝ forward at the 21-row Conv-M table (mobilenetv4ForwardBFull), the
typed StableHLO graph over it at mnv4FwdChainB's own tokens (mnv4FwdGraphBFull), and their
faithfulness (mnv4FwdGraphBFull_faithful). ResNet50FullB.lean is the file this one mirrors.
This is timm's mobilenetv4_conv_medium (1.0.28, the pinned spec): the post-DW carries each
downsample's stride, the pre-DW is BN only, stage 0 is relu, the head pools before conv_head,
the stem pads symmetrically. The artifacts are pinned to that function by three gates:
scripts/parity/mnv4_timm_parity.py (the JAX reference = timm on shared weights),
scripts/parity/mnv4_forward_tie.py (the render = the JAX reference) and
scripts/parity/grad_tie.py --net mnv4 (the render's backward = jax.grad of it).
No accuracy is quoted for this net.
The trunk is five CertLayer groups #
Each resolution group — rows 1–2, 3–6, 7–10, 11–15, 16–21 — is assembled with CertLayer.comp
and CertLayer.residual directly, as are the fused stage and the head, and inside a group:
.fwdis that group's forward — no second definition to keep in step;.okis its smoothness hypothesis, conjoined at exactly the right activations bycomprather than written out (the net has 38 relu clauses, counted byMobileNetV4FullBSeal's#guard; none of them is written here);.vjpis itsHasVJPAt(MobileNetV4FullBVJP.leanchains them); and.faithfulis its backward-graph faithfulness.
The groups are composed by a prefix chain (mnv4Pre0 … mnv4Pre6), not by one more
CertLayer.comp; the section before mnv4Pre0 says why. Mnv4SmoothAt therefore binds one
.ok per group plus the stem's clause (eight fields), and no 0 < ε hypothesis, because those
live inside the weight records.
The stem sits outside the chain, as EfficientNet-B0's does. CertLayer demands a backward
graph, and no render emits a gradient into %x: the artifact's backward ends at the stem conv's
weight gradient. So mnv4StemB is a plain function here (cbReluStridedB at the stem's widths),
its VJP is cbReluStridedBHasVJPAt, and the net-level VJP composes the two with vjpCompAt.
Conventions this net runs at #
| depth | 21 UIB blocks + the fused stage; 13 ExtraDW / 4 ConvNeXt-like / 4 FFN, and no IB |
| ladder | 224 →(stem s2) 112 →(fused s2) 56 →(blk1) 28 →(blk3) 14 →(blk11) 7 → GAP |
| channels | 32 → 48 → 80 → 160 → 256, head 256 → 960 → 1280 |
| BatchNorm | batch (bnBatchLA, reduce [0,2,3], width N·h·w) at all 77 sites |
| activation | relu, not relu6 (MobileNetV2 sits one file over and uses relu6), after every expand, post-DW, the stem, stage 0 and both head convs; the pre-DW and the project are BN only |
| padding | SYMMETRIC (k-1)/2 at every strided site — the stem, stage 0, the three strided post-DWs (timm) |
| stride | the three stride-2 rows (1, 3, 11) stride their POST-DW (timm's dw_mid); the pre-DW and the expand run at the input resolution |
| head | 1×1 256 → 960 conv-bn-relu at 7×7, GAP, then conv_head 960 → 1280 conv-bn-relu on the pooled [N, 960, 1, 1] (its BN over the batch alone), then dense |
| census | 233 parameter slots at nCls = 10 (8,447,322 scalars; 9,715,512 at 1000), bias-free by construction |
| artifacts | mnv4_fwd, mnv4in_fwd, and the 224×224 train steps at either precision — bf16 := false for mnv4_adam_train_step, mnv4in_adam64, mnv4in_adamdp64, true for the *bf16 ones' trunk. Not this graph: the frozen-statistics evals mnv4{,in}_fwd_eval and the 256×256 mnv4in_fwd_eval_s256 (stated in MobileNetV4FullBEval, at any input size, f32), the classifier-dropout variants mnv4in_emaacc{,dp}8x128wxdowd005bf16 (a %do operand; mnv4FwdGraphBFullDo below at bf16 := true), and the stochastic-depth train steps mnv4in_acc{,dp}8x128wxdropdowd01bf16 (a drop-path site on each of the 18 skip rows; MobileNetV4FullBDrop's graph at bf16 := true) |
N stays a binder throughout, as at r34/R50. On the data-parallel artifacts the render's N is
the per-replica batch and BatchNorm is synchronised across replicas; MobileNetV4SyncB.lean is
this file's twin for them: replica r's forward graph denotes shard r of
mobilenetv4ForwardBFull (R * N), this file's forward at the global batch. Unlike R50 there is
no resolution binder q: the statements are at 224×224.
Rows 4/5/7, 8/10, 12/18, 13/14 and 15/19/20 are shape-identical (same ic, oc, expand, preDWk, postDWk, h), so their UibParams records have the same type and swapping their weights
typechecks. Typing pins shape, not identity; what pins identity is the SSA names the forward graph
writes (%u4qW vs %u10qW), which is why the graph reads
its names from s.p off the table rather than taking them as arguments.
Checked against the committed bytes: verified_mlir/mnv4_fwd.mlir's signature is 234
arguments = %x + 233 parameters, and every name this file writes appears there.
References #
- Qin et al. 2024, MobileNetV4: Universal Models for the Mobile Ecosystem. https://arxiv.org/abs/2404.10518
These are abbrevs, and the rows are named rather than indexed. UibParams (mnv4Blocks[3]!)
in a type would force whnf through List.get! at every use; a named reducible constant reduces
to its projections directly, which is what lets CertLayer.comp line up 2 * 28 with 56 across
a stride join without a single transport.
The #guard below is the whole safety of that move: these 21 constants are pinned to
mnv4Blocks — the ONE table mnv4FwdChainB, the backward, the parameter signature and the BN stat
list all fold over — so a typo here is a build failure rather than a proof about a different net.
Equations
- Proofs.StableHLO.mnv4Row1 = { p := "1", ic := 48, oc := 80, expand := 4, preDWk := 3, postDWk := 5, h := 28, stride2 := true }
Instances For
Equations
- Proofs.StableHLO.mnv4Row2 = { p := "2", ic := 80, oc := 80, expand := 2, preDWk := 3, postDWk := 3, h := 28, stride2 := false }
Instances For
Equations
- Proofs.StableHLO.mnv4Row3 = { p := "3", ic := 80, oc := 160, expand := 6, preDWk := 3, postDWk := 5, h := 14, stride2 := true }
Instances For
Equations
- Proofs.StableHLO.mnv4Row4 = { p := "4", ic := 160, oc := 160, expand := 4, preDWk := 3, postDWk := 3, h := 14, stride2 := false }
Instances For
Equations
- Proofs.StableHLO.mnv4Row5 = { p := "5", ic := 160, oc := 160, expand := 4, preDWk := 3, postDWk := 3, h := 14, stride2 := false }
Instances For
Equations
- Proofs.StableHLO.mnv4Row6 = { p := "6", ic := 160, oc := 160, expand := 4, preDWk := 3, postDWk := 5, h := 14, stride2 := false }
Instances For
Equations
- Proofs.StableHLO.mnv4Row7 = { p := "7", ic := 160, oc := 160, expand := 4, preDWk := 3, postDWk := 3, h := 14, stride2 := false }
Instances For
Equations
- Proofs.StableHLO.mnv4Row8 = { p := "8", ic := 160, oc := 160, expand := 4, preDWk := 3, postDWk := 0, h := 14, stride2 := false }
Instances For
Equations
- Proofs.StableHLO.mnv4Row9 = { p := "9", ic := 160, oc := 160, expand := 2, preDWk := 0, postDWk := 0, h := 14, stride2 := false }
Instances For
Equations
- Proofs.StableHLO.mnv4Row10 = { p := "10", ic := 160, oc := 160, expand := 4, preDWk := 3, postDWk := 0, h := 14, stride2 := false }
Instances For
Equations
- Proofs.StableHLO.mnv4Row11 = { p := "11", ic := 160, oc := 256, expand := 6, preDWk := 5, postDWk := 5, h := 7, stride2 := true }
Instances For
Equations
- Proofs.StableHLO.mnv4Row12 = { p := "12", ic := 256, oc := 256, expand := 4, preDWk := 5, postDWk := 5, h := 7, stride2 := false }
Instances For
Equations
- Proofs.StableHLO.mnv4Row13 = { p := "13", ic := 256, oc := 256, expand := 4, preDWk := 3, postDWk := 5, h := 7, stride2 := false }
Instances For
Equations
- Proofs.StableHLO.mnv4Row14 = { p := "14", ic := 256, oc := 256, expand := 4, preDWk := 3, postDWk := 5, h := 7, stride2 := false }
Instances For
Equations
- Proofs.StableHLO.mnv4Row15 = { p := "15", ic := 256, oc := 256, expand := 4, preDWk := 0, postDWk := 0, h := 7, stride2 := false }
Instances For
Equations
- Proofs.StableHLO.mnv4Row16 = { p := "16", ic := 256, oc := 256, expand := 4, preDWk := 3, postDWk := 0, h := 7, stride2 := false }
Instances For
Equations
- Proofs.StableHLO.mnv4Row17 = { p := "17", ic := 256, oc := 256, expand := 2, preDWk := 3, postDWk := 5, h := 7, stride2 := false }
Instances For
Equations
- Proofs.StableHLO.mnv4Row18 = { p := "18", ic := 256, oc := 256, expand := 4, preDWk := 5, postDWk := 5, h := 7, stride2 := false }
Instances For
Equations
- Proofs.StableHLO.mnv4Row19 = { p := "19", ic := 256, oc := 256, expand := 4, preDWk := 0, postDWk := 0, h := 7, stride2 := false }
Instances For
Equations
- Proofs.StableHLO.mnv4Row20 = { p := "20", ic := 256, oc := 256, expand := 4, preDWk := 0, postDWk := 0, h := 7, stride2 := false }
Instances For
Equations
- Proofs.StableHLO.mnv4Row21 = { p := "21", ic := 256, oc := 256, expand := 2, preDWk := 5, postDWk := 0, h := 7, stride2 := false }
Instances For
Every MobileNetV4-Conv-M parameter, generic in the class count so one statement covers the
10-class Imagenette artifacts and the 1000-class mnv4in ones.
The 21 block fields are UibParams mnv4Row{k} — a record whose every width is a projection
of its row, so a record that disagrees with its row cannot be constructed and the forward
below needs no side conditions on widths. That is strictly stronger than ResNet-50's
R50IdW/R50ProjW, which are typed by loose {mid oc} binders. It still does not pin
identity between shape-identical rows (4/5/7, 8/10, 12/18, 13/14, 15/19/20) — see the header.
The 0 < ε obligations live INSIDE the records (UibParams's hq he hd hz), so the stem,
the fused stage and the head carry theirs as fields too. R50 keeps a separate R50IdPos
bundle; matching UibParams here means the whole-net VJP binds no epsilon hypotheses at all.
Every conv is bias-free — both renders bake convBias := false and bind each bias to the
%zb{c} zero the prelude declares — but the records still carry a b slot because the stage
vocabulary takes one. Those fields are ∀-quantified over; bias = 0 is one instance. Field
names are the render's own SSA prefixes, so a reader can match a parameter to its emitted name
without a table.
- sW : Kernel4 32 3 3 3
stem
%sW/%sg/%sbt: 3×3/s2, symmetric, 3 → 32, 224 → 112. - sb : Vec 32
- sE : ℝ
- sg : Vec 32
- sbt : Vec 32
- f0cW : Kernel4 128 32 3 3
fused stage
%f0cW: 3×3/s2 symmetric, 32 → 128, 112 → 56, then relu. - f0cb : Vec 128
- f0cE : ℝ
- f0cg : Vec 128
- f0cbt : Vec 128
- f0pW : Kernel4 48 128 1 1
fused stage
%f0pW: the 1×1 project, 128 → 48, no activation. - f0pb : Vec 48
- f0pE : ℝ
- f0pg : Vec 48
- f0pbt : Vec 48
block 1:
%u1*, 48 → 80, expand 4, dw 3/5, at 28×28.block 2:
%u2*, 80 → 80, expand 2, dw 3/3, at 28×28.block 3:
%u3*, 80 → 160, expand 6, dw 3/5, at 14×14.block 4:
%u4*, 160 → 160, expand 4, dw 3/3, at 14×14.block 5:
%u5*, 160 → 160, expand 4, dw 3/3, at 14×14.block 6:
%u6*, 160 → 160, expand 4, dw 3/5, at 14×14.block 7:
%u7*, 160 → 160, expand 4, dw 3/3, at 14×14.block 8:
%u8*, 160 → 160, expand 4, dw 3/0, at 14×14.block 9:
%u9*, 160 → 160, expand 2, dw 0/0, at 14×14.block 10:
%u10*, 160 → 160, expand 4, dw 3/0, at 14×14.block 11:
%u11*, 160 → 256, expand 6, dw 5/5, at 7×7.block 12:
%u12*, 256 → 256, expand 4, dw 5/5, at 7×7.block 13:
%u13*, 256 → 256, expand 4, dw 3/5, at 7×7.block 14:
%u14*, 256 → 256, expand 4, dw 3/5, at 7×7.block 15:
%u15*, 256 → 256, expand 4, dw 0/0, at 7×7.block 16:
%u16*, 256 → 256, expand 4, dw 3/0, at 7×7.block 17:
%u17*, 256 → 256, expand 2, dw 3/5, at 7×7.block 18:
%u18*, 256 → 256, expand 4, dw 5/5, at 7×7.block 19:
%u19*, 256 → 256, expand 4, dw 0/0, at 7×7.block 20:
%u20*, 256 → 256, expand 4, dw 0/0, at 7×7.block 21:
%u21*, 256 → 256, expand 2, dw 5/0, at 7×7.- h1W : Kernel4 960 256 1 1
head conv 1
%h1W: 1×1, 256 → 960, at 7×7. - h1b : Vec 960
- h1E : ℝ
- h1g : Vec 960
- h1bt : Vec 960
- hW : Kernel4 1280 960 1 1
head conv 2
%hW(timm'sconv_head): 1×1, 960 → 1280, on the POOLED features. - hb : Vec 1280
- hE : ℝ
- hg : Vec 1280
- hbt : Vec 1280
- Wd : Mat 1280 nCls
classifier
%Wd/%bd, afterconv_head. - bd : Vec nCls
Instances For
MNv4's stem forward: 3×3/s2 conv, SYMMETRIC padding (timm's conv_stem) → batch BN → relu.
The XLA-SAME phase (flatConvStride2Xla, pads (0,1) at 224) also gives 112×112, so only a
forward on shared weights tells the two apart.
Equations
- Proofs.StableHLO.mnv4StemB N h w Ws bs εs γs βs = Proofs.relu (N * (oc * h * w)) ∘ Proofs.StableHLO.bnBatchLA N oc h w εs γs βs ∘ Proofs.StableHLO.batchMap N (Proofs.flatConvStride2 Ws bs)
Instances For
The fused stage (stage 0): 3×3/s2 symmetric conv-bn-relu 32 → 128 at 112 → 56, then the
1×1 project 128 → 48 (timm's EdgeResidual).
Equations
- One or more equations did not get rendered due to their size.
Instances For
The head, timm's order: 1×1 256 → 960 conv-bn-relu at 7×7, GAP, conv_head 1×1
960 → 1280 conv-bn-relu on the pooled features (its BN over the batch alone), classifier.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The trunk is built in groups, and that is a proof-engineering requirement. One 24-stage
CertLayer elaborates fine — it is the graph faithfulness proof over it that does not: the
whole-net rewrite chain produces a term whose kernel check ends in a deterministic timeout. Split
at the net's own resolution boundaries, each group's proof is small, and the whole-net theorem is
six rewrites over them. The grouping is the ladder a reader already knows — 56, 28, 14, 7 — so
it costs nothing in readability and buys a bounded proof.
Trunk group Res28 — rows 1–2: the 56→28 reduction and the block that follows it.
Equations
Instances For
Trunk group Res14a — rows 3–6: the 28→14 reduction, then three ExtraDW blocks.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Trunk group Res14b — rows 7–10 at 14×14: ExtraDW, ConvNeXt, FFN, ConvNeXt — three families in four blocks.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Trunk group Res7a — rows 11–15: the last reduction (14→7), then four blocks at 7×7.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The seven groups are composed by a prefix chain, not by one more CertLayer.comp.
A mnv4NetLayer := fused.comp (res28.comp (… .comp head)) elaborates fine and reads beautifully.
But every downstream statement then has to peel CertLayer.comp to get at .fwd, and at MNv4's
LITERAL resolutions that peel is fatal: (L₁.comp L₂).fwd = L₂.fwd ∘ L₁.fwd is rfl, yet
discharging it at these instances — by rfl, by simp only [CertLayer.comp_fwd], inside the
graph-faithfulness capstone or in a standalone lemma — ends in a (kernel) deterministic timeout.
The groups' own five-stage comp chains are fine; it is composing the
compositions, under something that can start unfolding, that is not.
So the top level is seven named prefixes and the forward is their nest — ResNet-50's shape at
seven stages instead of eighteen. What that costs is the hypothesis bundle: Mnv4SmoothAt binds
one .ok per group plus the stem's clause (eight fields) rather than one for the whole trunk.
Each group's .ok is still the conjunction CertLayer.comp assembled from its blocks'
conditions at their own activations, so the 38 relu clauses are never written down one by one,
and no 0 < ε hypothesis appears at all. R50's two apex bundles carry 35 fields.
More generally, a net whose resolutions are literals cannot afford the proof idioms a net with a
resolution binder can: ResNet-50's q keeps den stuck, MNv4's 224/112/56/28/14/7 let it run.
The stem graph builder's genericity, the prefix chain and the capstone's rw in place of
simp only all trace to that.
Prefix 0: the stem's output.
Equations
- Proofs.StableHLO.mnv4Pre0 N w x = Proofs.StableHLO.mnv4StemB N 112 112 w.sW w.sb w.sE w.sg w.sbt x
Instances For
Prefix 1: through the fused stage, at 56×56.
Equations
- Proofs.StableHLO.mnv4Pre1 N w x = (Proofs.StableHLO.mnv4FusedStack N w).fwd (Proofs.StableHLO.mnv4Pre0 N w x)
Instances For
Prefix 2: through rows 1–2, at 28×28.
Equations
- Proofs.StableHLO.mnv4Pre2 N w x = (Proofs.StableHLO.mnv4Res28Layer N w).fwd (Proofs.StableHLO.mnv4Pre1 N w x)
Instances For
Prefix 3: through rows 3–6, at 14×14.
Equations
- Proofs.StableHLO.mnv4Pre3 N w x = (Proofs.StableHLO.mnv4Res14aLayer N w).fwd (Proofs.StableHLO.mnv4Pre2 N w x)
Instances For
Prefix 4: through rows 7–10, still at 14×14.
Equations
- Proofs.StableHLO.mnv4Pre4 N w x = (Proofs.StableHLO.mnv4Res14bLayer N w).fwd (Proofs.StableHLO.mnv4Pre3 N w x)
Instances For
Prefix 5: through rows 11–15, at 7×7.
Equations
- Proofs.StableHLO.mnv4Pre5 N w x = (Proofs.StableHLO.mnv4Res7aLayer N w).fwd (Proofs.StableHLO.mnv4Pre4 N w x)
Instances For
Prefix 6: through rows 16–21 — the whole trunk below the head.
Equations
- Proofs.StableHLO.mnv4Pre6 N w x = (Proofs.StableHLO.mnv4Res7bLayer N w).fwd (Proofs.StableHLO.mnv4Pre5 N w x)
Instances For
The full batch-BN MobileNetV4-Conv-M, N*(3*224*224) → N*nCls.
The stem, the fused stage, the five resolution groups, the head. Every block inside those
groups is mnv4BodyOfRow at its own row, so the k = 0 dispatch is READ from mnv4Blocks
rather than chosen here — the property MobileNetV4BackB0.lean's dispatch section exists to
establish, now carried to the net. The eighteen skips are CertLayer.residual, which
typechecks with no transport because s.oc and s.ic reduce to the same literal at every
stride-1 row (guarded there).
Equations
Instances For
Stem graph: 3×3/s2 symmetric conv → batch BN → relu.
Generic in the widths, and that is an elaboration requirement, not style.
Pinning ic := 3, oc := 32, h := 112 here makes the conv's den_batchOp rfl a claim
about concrete 150528- and 401408-element tensors, and the KERNEL tries to reduce it: the
lemma takes over a minute and then fails with (kernel) deterministic timeout. Proven at
binders it takes two seconds, and applying it at the net's literals is free — instantiating a
proven lemma, not proving one. mnv2StemGraphB and r50StemGraphB are generic for the same
reason, which is easy to read as a stylistic habit and is not.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Fused stage graph: 3×3/s2 symmetric conv → BN → relu → 1×1 project → BN. No skip.
Generic in the widths, for the reason mnv4StemGraphB records.
Equations
- One or more equations did not get rendered due to their size.
Instances For
ExtraDW body graph — both depthwises present, 13 of Conv-M's 21 rows (and all three
stride-2 ones, whose own builder is below). The BODY only: the identity skip is .addVB'd on
at the call site, which is what keeps the whole-net graph LINEAR instead of duplicating each
skip's entire input subtree.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The ExtraDW body graph denotes the row-typed body's forward — generic in the row, so one
theorem serves all thirteen. The two hypotheses are exactly the dispatch conditions
mnv4PreDWSlot/mnv4PostDWSlot branch on, discharged by decide at each concrete row.
ConvNeXt-like body graph — pre-DW only, postDWk = 0, four of Conv-M's rows (8, 10, 16,
21). The absent depthwise emits no tokens, exactly as mnv4PostDWSlot inserts id': the
UibParams record still carries a degenerate DepthwiseKernel _ 0 0 in that slot and this
graph simply does not read it. A token stated for an absent depthwise would be a den of a
node the artifact does not have.
Equations
- One or more equations did not get rendered due to their size.
Instances For
FFN body graph — neither depthwise, four of Conv-M's rows (9, 15, 19, 20): expand,
project, and nothing else. Both slots are id'.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Strided block graph — rows 1, 3 and 11, all ExtraDW. timm strides dw_mid: the BN-only
pre-DW and the expand run at the input resolution 2h, the post-DW (.depthwiseStrided,
symmetric) takes it to h, the project runs at h. No skip: ic ≠ oc at all three, so the
block IS the body and there is no .addVB.
Equations
- One or more equations did not get rendered due to their size.
Instances For
One skip row's graph: its body's, plus the identity skip. Trivial as a definition; it exists as a barrier to unfolding.
Why it is a named combinator and not an inline .addVB. The residual add needs the
block's input subtree twice, and MNv4 has eighteen of them. Written inline — or behind a let
in the whole-net graph, which simp only [mnv4FwdGraphBFull] zeta-expands — the term doubles at
every skip the moment anything unfolds it, and the whole-net faithfulness proof ends in a
kernel deterministic timeout.
Kept folded, with mnv4SkipGraphB_faithful rewriting den (mnv4SkipGraphB body e) in ONE
step, den e occurs once and the whole-net term stays linear in the depth. R50 never met this:
its r50IdGraphB takes e as a binder and duplicates it inside the builder, which has the
same effect for the same reason.
Equations
- Proofs.StableHLO.mnv4SkipGraphB body e = (body e).addVB e
Instances For
A skip row denotes residual of whatever its body denotes — generic in both, so one
theorem covers all eighteen, in this graph and the eval graph (MobileNetV4FullBEval), and
the body's own faithfulness lemma is the only input.
Head graph, timm's order: 1×1 conv-BN-relu, GAP, conv_head 1×1 conv-BN-relu on the
pooled features, dense — with the two castIdx relabellings mnv4Head carries, which emit no
text. Generic in the widths, for the reason mnv4StemGraphB records.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The fused stage's graph faithfulness, restated at mnv4FusedStack itself.
This corollary exists so the whole-net proof never has to unfold mnv4FusedStack. It looks
redundant and is not: at MNv4's literal resolutions, letting anything unfold far enough for
den to start recursing turns the kernel's check into an evaluation of the whole graph, which
is the failure the group split above works around. Seven rewrites all of the shape
den <subgraph> = <subLayer>.fwd (den ·) keep every stage opaque.
The stem's, likewise, at the net's own widths.
The full batch-BN MobileNetV4-Conv-M forward graph, at mnv4FwdChainB's own tokens
and its own SSA names, so the typed graph diffs against mnv4_fwd.mlir and mnv4in_fwd.mlir
name for name (the artifacts it covers are listed in the module's conventions table). Checked
against the committed bytes: all 247 names this writes appear in mnv4_fwd.mlir, and between
them they cover all 233 of its declared parameters. bf16 selects the conv and depthwise
kinds at every site (StableHLO.PrecisionSwitch): false is the f32 artifacts' graph, true
the bf16 ones'; the dense stays f32 in both.
The eighteen skip rows go through mnv4SkipGraphB, which is what keeps this term LINEAR in
the depth — see that combinator's docstring for the failure mode it exists to prevent.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The MobileNetV4-Conv-M forward graph at batch BatchNorm denotes the whole-net forward. Seven rewrites — the stem, the fused stage, the five resolution groups and the head — each of which was itself proved one block at a time.
Each group's proof discharges its blocks' dispatch hypotheses by decide at the concrete
row, so what selects ExtraDW / ConvNeXt / FFN is the TABLE, not this file. A row wired to the
wrong builder fails to elaborate rather than proving something about a different net.
Trunk group Res28 — rows 1–2, at 56 → 28 — as its own blocks, each at its table row (mnv4Row1, mnv4Row2).
Trunk group Res14a — rows 3–6, at 28 → 14 — as its own blocks, each at its table row (mnv4Row3, mnv4Row4, mnv4Row5, mnv4Row6).
Trunk group Res14b — rows 7–10, at 14×14 — as its own blocks, each at its table row (mnv4Row7, mnv4Row8, mnv4Row9, mnv4Row10).
Trunk group Res7a — rows 11–15, at 14 → 7 — as its own blocks, each at its table row (mnv4Row11, mnv4Row12, mnv4Row13, mnv4Row14, mnv4Row15).
Trunk group Res7b — rows 16–21, at 7×7 — as its own blocks, each at its table row (mnv4Row16, mnv4Row17, mnv4Row18, mnv4Row19, mnv4Row20, mnv4Row21).
The head up to the classifier's input: 1×1 conv-BN-relu, GAP, conv_head conv-BN-relu on the
pooled features, relabelled to [N, oc]. Generic in the widths, as mnv4HeadGraphB.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The MobileNetV4-Conv-M forward with classifier dropout at the per-element mask m (the
driver's inverted mask, %do): mobilenetv4ForwardBFull with dropout m on the classifier's
input.
Equations
- One or more equations did not get rendered due to their size.
Instances For
At the all-ones mask the dropout forward is the certified forward.
Head graph with classifier dropout: mnv4HeadGraphB with a dropoutB on the dense's input,
its mask the input mName (the render's is doName).
Equations
- One or more equations did not get rendered due to their size.
Instances For
The %do forward graph: mnv4FwdGraphBFull with the dropout head.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The dropout head's faithfulness at the net's widths — the barrier mnv4HeadStack_graph_faithful
is for the plain head.
The %do forward graph denotes the dropout forward, at every mask — the trunk by the
same group rewrites as mnv4FwdGraphBFull_faithful.