Documentation

LeanMlir.Proofs.Nets.EfficientNet.EfficientNetStepTieG

EfficientNet-B0's step tie at the un-fused gradient and the smoothed loss #

EfficientNetStepTie.lean ties all 262 parameters of the SGD-inline efficientnet_train_step.mlir: each fused theta - lr * g op dens to the certified step at the cotangent the emitted backward chain delivers. This file is that statement re-pointed along two axes.

Axis 1 — the gradient node. Every conjunct is at the raw gradient node (*GradB), which is what efficientnet_adam_train_step.mlir and the f32 efficientnetin_* artifacts emit; the fused op appears only in the SGD-inline file. The optimizer update that consumes the node (Adam, RMSProp, EMA, clipping) is outside this statement. The threaded forward is efficientnetForwardBFullDrop at the renderer's two optional sites (below). GradNodesB is the fold each conjunct delegates to.

Precision is a flag on the statement. The ImageNet run the book reports trains from efficientnetin_emarmsdp64dropdowxeps0001bf16, whose conv and depthwise weight gradients are the bf16 kinds (convWeightGradBBf16, depthwiseWeightGradBBf16, …; Foundation.Bf16GradNodes). Every conv and depthwise weight node below is stated on the renderers' switch — ConvWTiedBAt bf16 / ConvStridedXlaWTiedBAt bf16 / DepthwiseWTiedBAt bf16 / DepthwiseStridedXlaWTiedBAt bf16 (Foundation.GradNodesBAt): bf16 := false is the f32 node, bf16 := true the bf16 one — and the capstone efficientnet_net_tiedG takes bf16, so it reaches the bf16 artifacts' gradient nodes read over ℝ exactly as it reads the f32 ones (Bf16Erasure: at the identity rounding the bf16 kind denotes what its f32 peer does). The squeeze-excite and classifier denses, BatchNorm and the bias nodes carry no flag because no render switches them.

The training masks are optional sites on the statement. efficientnetin_emarmsdp64dropdowxeps0001bf16 is a dropdo artifact: stochastic depth on the nine skip-carrying blocks (b3 b5 b7 b8 b10 b11 b13 b14 b15, the renderer's enetDropIdxs, a per-example scale %dp<i> on the residual branch before the skip add) and classifier dropout (%do, per element, between the GAP and the dense). The capstone takes them as sd : Option (Fin 9 → Vec N) and cd : Option (Vec (N * 1280)) (Proofs.Foundation.DropSites; the forward is efficientnetForwardBFullDrop at the same binders): none is the drop-free artifacts' chain — the statement exactly as it was — and some the *drop* / *do* / dropdo artifacts'. At a drop site the backward applies the same scale to the block-output cotangent on its way into the BRANCH and leaves the skip's raw (eBack's rule, Proofs.dropPath_vjp_is_self): the block's parameter nodes are tied at dropPathOpt … dy, and the block VJP that threads the chain is mbResidDropWHasVJP, whose backward is that by definition. At the head the dense weight node reads the DROPPED activation and the classifier's input-VJP passes through the mask before the GAP backward (headDoFwdBHasVJP), as MobileNetV2StepTieB's does.

Axis 2 — the loss. The capstone's top-of-chain cotangent is smoothedLossCotGraph's (Foundation/SmoothedLossCot.lean), at a general target: the six-op chain softmaxRow → subB → scaleB → addVB → shiftB → divConstB the batched renders emit, with the target arriving as the graph input %onehot — a soft vector under mixup or cutmix. The fused file pins it to softmax − oneHot, the gradient of plain cross-entropy at a hard label. unrowB / rowB are ResNet-34's casts between the loss chain's one-row-per-example index and the dense ops' plain per-example width.

Relation to the fused file #

Every cotangent chain, every forward activation and every Jacobian witness is EfficientNetStepTie.lean's, unchanged. The fusion is rfl — *SgdB_eq_grad says the fused op is theta - lr * applied to the un-fused one — so each conjunct's proof is the fused file's with the wrapper peeling dropped. The lr, wN, bN, gN and lrStr binders disappear with the wrapper.

The head takes g as a parameter here. The fused enetHeadTied computes g := rowSoftmax(logits) − onehot internally, which is what pinned that file to the hard label. The per-block ties are forall cot statements and were already loss-agnostic, so only the head and the capstone differ.

Conventions carried unchanged from the fused file: batch BatchNorm (bnBatchLA), XLA-SAME at the 3x3/s2 stem and at the four strided depthwises (TF's padding at every strided conv since D3, 2026-10-12), swish (no kink, so no smoothness hypothesis anywhere), and the SE gate's fan-in folded into the block VJPs.

One replica. Every statement here is at one replica's node. Every B0 data-parallel render synchronises BatchNorm; its all-reduced gradients are efficientnet_net_syncTiedG (EfficientNetSyncStepTieG.lean): this file's node at N := R·N, at the same mask sites.

def Proofs.EnetTieG.ConvBBetaTiedB (N h w : ℕ) {oc : ℕ} (cotN : String) (ε : ℝ) (b : Vec oc) (cot : Vec (N * (oc * h * w))) :

A conv or depthwise bias, tied. A bias gradient is the channel sum of the conv-output cotangent cot (network layout), which is what the emitted bnBetaGradB node computes; the right side states it as a per-channel BatchNorm's β-Jacobian, at the γ and activation (both zero here) that β's gradient ignores.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    theorem Proofs.EnetTieG.convBBetaTiedB_holds {N h w oc : ℕ} {cotN : String} {ε : ℝ} {b : Vec oc} {cot : Vec (N * (oc * h * w))} :
    ConvBBetaTiedB N h w cotN ε b cot
    def Proofs.EnetTieG.enetExpTiedG {N ic mid oc h w r kHd kWd : ℕ} (xN vN epsStr cotN : String) (εe : ℝ) (hεe : 0 < εe) (εd : ℝ) (hεd : 0 < εd) (εp : ℝ) (hεp : 0 < εp) (We : Kernel4 mid ic 1 1) (be γe βe : Vec mid) (Wd : DepthwiseKernel mid kHd kWd) (bd γd βd : Vec mid) (Wz1 : Mat mid r) (bz1 : Vec r) (Wz2 : Mat r mid) (bz2 : Vec mid) (Wp : Kernel4 oc mid 1 1) (bp γp βp : Vec oc) (bf16 : Bool) (xin : Vec (N * (ic * h * w))) (dyOut : Vec (N * (oc * h * w))) :
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      theorem Proofs.EnetTieG.enet_exp_tiedG {N ic mid oc h w r kHd kWd : ℕ} (xN vN epsStr cotN : String) (εe : ℝ) (hεe : 0 < εe) (εd : ℝ) (hεd : 0 < εd) (εp : ℝ) (hεp : 0 < εp) (We : Kernel4 mid ic 1 1) (be γe βe : Vec mid) (Wd : DepthwiseKernel mid kHd kWd) (bd γd βd : Vec mid) (Wz1 : Mat mid r) (bz1 : Vec r) (Wz2 : Mat r mid) (bz2 : Vec mid) (Wp : Kernel4 oc mid 1 1) (bp γp βp : Vec oc) (bf16 : Bool) (xin : Vec (N * (ic * h * w))) (dyOut : Vec (N * (oc * h * w))) :
      enetExpTiedG xN vN epsStr cotN εe hεe εd hεd εp hεp We be γe βe Wd bd γd βd Wz1 bz1 Wz2 bz2 Wp bp γp βp bf16 xin dyOut

      Strided downsampling MBConv block — all 16 params tied (b2/b4/b6/b12) #

      Same as the expand block EXCEPT the expand stage lives at the block-input grid 2h×2w and the depthwise is strided (depthwiseStridedXlaWeightGradB, the expand-side cotangent cotEr upsamples h→2h via dStridedXlaInB). No skip (spatial+channels change).

      def Proofs.EnetTieG.enetStridedTiedG {N ic mid oc h w r kHd kWd : ℕ} (xN vN epsStr cotN : String) (εe : ℝ) (hεe : 0 < εe) (εd : ℝ) (hεd : 0 < εd) (εp : ℝ) (hεp : 0 < εp) (We : Kernel4 mid ic 1 1) (be γe βe : Vec mid) (Wd : DepthwiseKernel mid kHd kWd) (bd γd βd : Vec mid) (Wz1 : Mat mid r) (bz1 : Vec r) (Wz2 : Mat r mid) (bz2 : Vec mid) (Wp : Kernel4 oc mid 1 1) (bp γp βp : Vec oc) (bf16 : Bool) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dyOut : Vec (N * (oc * h * w))) :

      Strided downsampling MBConv block, tied. All 16 params at the real forward (expand at 2h×2w, strided depthwise 2h→h) + the chain cotangents driven by dyOut.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem Proofs.EnetTieG.enet_strided_tiedG {N ic mid oc h w r kHd kWd : ℕ} (xN vN epsStr cotN : String) (εe : ℝ) (hεe : 0 < εe) (εd : ℝ) (hεd : 0 < εd) (εp : ℝ) (hεp : 0 < εp) (We : Kernel4 mid ic 1 1) (be γe βe : Vec mid) (Wd : DepthwiseKernel mid kHd kWd) (bd γd βd : Vec mid) (Wz1 : Mat mid r) (bz1 : Vec r) (Wz2 : Mat r mid) (bz2 : Vec mid) (Wp : Kernel4 oc mid 1 1) (bp γp βp : Vec oc) (bf16 : Bool) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dyOut : Vec (N * (oc * h * w))) :
        enetStridedTiedG xN vN epsStr cotN εe hεe εd hεd εp hεp We be γe βe Wd bd γd βd Wz1 bz1 Wz2 bz2 Wp bp γp βp bf16 xin dyOut

        No-expand MBConv block (b1, t=1) — all 12 params tied (depthwise on ic → SE → project) #

        NO expand conv: the depthwise runs directly on the block input (ic channels). 12 params (4 depthwise+BN, 4 SE, 4 project). The SE squeeze/excite is on ic channels (ic → r → ic).

        def Proofs.EnetTieG.enetNoExpTiedG {N ic oc h w r kHd kWd : ℕ} (xN vN epsStr cotN : String) (εd : ℝ) (hεd : 0 < εd) (εp : ℝ) (hεp : 0 < εp) (Wd : DepthwiseKernel ic kHd kWd) (bd γd βd : Vec ic) (Wz1 : Mat ic r) (bz1 : Vec r) (Wz2 : Mat r ic) (bz2 : Vec ic) (Wp : Kernel4 oc ic 1 1) (bp γp βp : Vec oc) (bf16 : Bool) (xin : Vec (N * (ic * h * w))) (dyOut : Vec (N * (oc * h * w))) :

        No-expand MBConv block, tied. All 12 params at the real forward + chain cotangents.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          theorem Proofs.EnetTieG.enet_noexp_tiedG {N ic oc h w r kHd kWd : ℕ} (xN vN epsStr cotN : String) (εd : ℝ) (hεd : 0 < εd) (εp : ℝ) (hεp : 0 < εp) (Wd : DepthwiseKernel ic kHd kWd) (bd γd βd : Vec ic) (Wz1 : Mat ic r) (bz1 : Vec r) (Wz2 : Mat r ic) (bz2 : Vec ic) (Wp : Kernel4 oc ic 1 1) (bp γp βp : Vec oc) (bf16 : Bool) (xin : Vec (N * (ic * h * w))) (dyOut : Vec (N * (oc * h * w))) :
          enetNoExpTiedG xN vN epsStr cotN εd hεd εp hεp Wd bd γd βd Wz1 bz1 Wz2 bz2 Wp bp γp βp bf16 xin dyOut

          Stem — the 3×3/s2 conv-bn-swish (4 params), feeding block 1 #

          swish(bn(convStride2Xla Ws bs x)), 3→32 at 224→112, at the XLA-SAME phase the shipped stem uses. The cotangent block 1 delivers at the stem swish output (dyStem) lifts through swish-back

          def Proofs.EnetTieG.enetStemTiedG {N ic oc h w kHs kWs : ℕ} (xN vN epsStr cotN : String) (εs : ℝ) (hεs : 0 < εs) (Ws : Kernel4 oc ic kHs kWs) (bs γs βs : Vec oc) (bf16 : Bool) (x : Vec (N * (ic * (2 * h) * (2 * w)))) (dyStem : Vec (N * (oc * h * w))) :

          Stem, tied. The 3×3/s2 conv (Ws/bs) + its true-BN (γs/βs) at the real stem forward + the cotangent through the stem swish (no maxpool, no conv-back).

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem Proofs.EnetTieG.enet_stem_tiedG {N ic oc h w kHs kWs : ℕ} (xN vN epsStr cotN : String) (εs : ℝ) (hεs : 0 < εs) (Ws : Kernel4 oc ic kHs kWs) (bs γs βs : Vec oc) (bf16 : Bool) (x : Vec (N * (ic * (2 * h) * (2 * w)))) (dyStem : Vec (N * (oc * h * w))) :
            enetStemTiedG xN vN epsStr cotN εs hεs Ws bs γs βs bf16 x dyStem

            Head — the 1×1 conv-bn-swish (4 params) → GAP → dense (Wfc/bfc), + the loss cotangent #

            dense(GAP(swish(bn(conv Wh bh))))) (320→1280 conv, GAP, 1280→nClasses dense). The loss cotangent g is a parameter here (the capstone supplies the smoothed-loss chain's). The head conv params tie at the chain cotangent (g → dense-back → GAP-back → swish/BN-back); the dense Wfc/bfc tie at g directly.

            def Proofs.EnetTieG.enetHeadTiedG {N c oc h w nC : ℕ} (xN vN epsStr cotN dN : String) (εh : ℝ) (hεh : 0 < εh) (Wh : Kernel4 oc c 1 1) (bh γh βh : Vec oc) (Wfc : Mat oc nC) (bfc : Vec nC) (bf16 : Bool) (cd : Option (Vec (N * oc))) (xhead : Vec (N * (c * h * w))) (g : Vec (N * nC)) :

            Head, tied. The gradient nodes of the 4 head conv-bn params and the 2 dense params (Wfc/bfc) denote the certified gradient at the real head forward and a loss cotangent g taken as a parameter.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              theorem Proofs.EnetTieG.enet_head_tiedG {N c oc h w nC : ℕ} (xN vN epsStr cotN dN : String) (εh : ℝ) (hεh : 0 < εh) (Wh : Kernel4 oc c 1 1) (bh γh βh : Vec oc) (Wfc : Mat oc nC) (bfc : Vec nC) (bf16 : Bool) (cd : Option (Vec (N * oc))) (xhead : Vec (N * (c * h * w))) (g : Vec (N * nC)) :
              enetHeadTiedG xN vN epsStr cotN dN εh hεh Wh bh γh βh Wfc bfc bf16 cd xhead g

              Bundle-taking *TiedAt wrappers — one per block type, for the whole-net thread #

              Each takes the B0Weights block bundle (MBW/MBWNoExp) + its ε-positivity + the block input + the downstream cotangent dyOut, and delegates to the per-block-type tie.

              def Proofs.EnetTieG.enetExpTiedGAt (xN vN epsStr cotN : String) {N ic mid oc r kh kw : ℕ} (h w : ℕ) (p : MBW ic mid oc r kh kw) (he : 0 < p.eε) (hd : 0 < p.dε) (hp : 0 < p.pε) (bf16 : Bool) (xin : Vec (N * (ic * h * w))) (dyOut : Vec (N * (oc * h * w))) :
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                def Proofs.EnetTieG.enetStridedTiedGAt (xN vN epsStr cotN : String) {N ic mid oc r kh kw : ℕ} (h w : ℕ) (p : MBW ic mid oc r kh kw) (he : 0 < p.eε) (hd : 0 < p.dε) (hp : 0 < p.pε) (bf16 : Bool) (xin : Vec (N * (ic * (2 * h) * (2 * w)))) (dyOut : Vec (N * (oc * h * w))) :
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  def Proofs.EnetTieG.enetNoExpTiedGAt (xN vN epsStr cotN : String) {N ic oc r kh kw : ℕ} (h w : ℕ) (p : MBWNoExp ic oc r kh kw) (hd : 0 < p.dε) (hp : 0 < p.pε) (bf16 : Bool) (xin : Vec (N * (ic * h * w))) (dyOut : Vec (N * (oc * h * w))) :
                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    theorem Proofs.EnetTieG.efficientnet_net_tiedG (xN vN epsStr cotN dN : String) (N : ℕ) {nCls : ℕ} (w : B0Weights nCls) (hεw : w.EpsPos) (bf16 : Bool) (sd : Option (Fin 9 → Vec N)) (cd : Option (Vec (N * 1280))) (aStr negAK bStr logN ohN : String) (α B : ℝ) (x : Vec (N * (3 * 224 * 224))) (t : Vec (N * (1 * nCls))) :
                    have a0 := stemB N w.sW w.sb w.sε w.sγ w.sβ x; have a1 := mbNoExpW N 112 112 w.b1 a0; have a2 := mbStridedW N 56 56 w.b2 a1; have a3 := mbResidDropW N 56 56 w.b3 (Option.map (fun (f : Fin 9 → Vec N) => f 0) sd) a2; have a4 := mbStridedW N 28 28 w.b4 a3; have a5 := mbResidDropW N 28 28 w.b5 (Option.map (fun (f : Fin 9 → Vec N) => f 1) sd) a4; have a6 := mbStridedW N 14 14 w.b6 a5; have a7 := mbResidDropW N 14 14 w.b7 (Option.map (fun (f : Fin 9 → Vec N) => f 2) sd) a6; have a8 := mbResidDropW N 14 14 w.b8 (Option.map (fun (f : Fin 9 → Vec N) => f 3) sd) a7; have a9 := mbExpW N 14 14 w.b9 a8; have a10 := mbResidDropW N 14 14 w.b10 (Option.map (fun (f : Fin 9 → Vec N) => f 4) sd) a9; have a11 := mbResidDropW N 14 14 w.b11 (Option.map (fun (f : Fin 9 → Vec N) => f 5) sd) a10; have a12 := mbStridedW N 7 7 w.b12 a11; have a13 := mbResidDropW N 7 7 w.b13 (Option.map (fun (f : Fin 9 → Vec N) => f 6) sd) a12; have a14 := mbResidDropW N 7 7 w.b14 (Option.map (fun (f : Fin 9 → Vec N) => f 7) sd) a13; have a15 := mbResidDropW N 7 7 w.b15 (Option.map (fun (f : Fin 9 → Vec N) => f 8) sd) a14; have a16 := mbExpW N 7 7 w.b16 a15; have g := BackLinks.unrowB N nCls (StableHLO.den (smoothedLossCotGraph N nCls α B aStr negAK bStr logN ohN (BackLinks.rowB N nCls (headDoFwdB N w.hW w.hb w.hε w.hγ w.hβ w.fcW w.fcb cd a16)) t)); have dy16 := (headDoFwdBHasVJP N w.hW w.hb w.hε ⋯ w.hγ w.hβ w.fcW w.fcb cd).backward a16 g; have dy15 := (mbExpWHasVJP N 7 7 w.b16 ⋯ ⋯ ⋯).backward a15 dy16; have dy14 := (mbResidDropWHasVJP N 7 7 w.b15 (Option.map (fun (f : Fin 9 → Vec N) => f 8) sd) ⋯ ⋯ ⋯).backward a14 dy15; have dy13 := (mbResidDropWHasVJP N 7 7 w.b14 (Option.map (fun (f : Fin 9 → Vec N) => f 7) sd) ⋯ ⋯ ⋯).backward a13 dy14; have dy12 := (mbResidDropWHasVJP N 7 7 w.b13 (Option.map (fun (f : Fin 9 → Vec N) => f 6) sd) ⋯ ⋯ ⋯).backward a12 dy13; have dy11 := (mbStridedWHasVJP N 7 7 w.b12 ⋯ ⋯ ⋯).backward a11 dy12; have dy10 := (mbResidDropWHasVJP N 14 14 w.b11 (Option.map (fun (f : Fin 9 → Vec N) => f 5) sd) ⋯ ⋯ ⋯).backward a10 dy11; have dy9 := (mbResidDropWHasVJP N 14 14 w.b10 (Option.map (fun (f : Fin 9 → Vec N) => f 4) sd) ⋯ ⋯ ⋯).backward a9 dy10; have dy8 := (mbExpWHasVJP N 14 14 w.b9 ⋯ ⋯ ⋯).backward a8 dy9; have dy7 := (mbResidDropWHasVJP N 14 14 w.b8 (Option.map (fun (f : Fin 9 → Vec N) => f 3) sd) ⋯ ⋯ ⋯).backward a7 dy8; have dy6 := (mbResidDropWHasVJP N 14 14 w.b7 (Option.map (fun (f : Fin 9 → Vec N) => f 2) sd) ⋯ ⋯ ⋯).backward a6 dy7; have dy5 := (mbStridedWHasVJP N 14 14 w.b6 ⋯ ⋯ ⋯).backward a5 dy6; have dy4 := (mbResidDropWHasVJP N 28 28 w.b5 (Option.map (fun (f : Fin 9 → Vec N) => f 1) sd) ⋯ ⋯ ⋯).backward a4 dy5; have dy3 := (mbStridedWHasVJP N 28 28 w.b4 ⋯ ⋯ ⋯).backward a3 dy4; have dy2 := (mbResidDropWHasVJP N 56 56 w.b3 (Option.map (fun (f : Fin 9 → Vec N) => f 0) sd) ⋯ ⋯ ⋯).backward a2 dy3; have dy1 := (mbStridedWHasVJP N 56 56 w.b2 ⋯ ⋯ ⋯).backward a1 dy2; have dy0 := (mbNoExpWHasVJP N 112 112 w.b1 ⋯ ⋯).backward a0 dy1; enetStemTiedG xN vN epsStr cotN w.sε ⋯ w.sW w.sb w.sγ w.sβ bf16 x dy0 ∧ enetNoExpTiedGAt xN vN epsStr cotN 112 112 w.b1 ⋯ ⋯ bf16 a0 dy1 ∧ enetStridedTiedGAt xN vN epsStr cotN 56 56 w.b2 ⋯ ⋯ ⋯ bf16 a1 dy2 ∧ enetExpTiedGAt xN vN epsStr cotN 56 56 w.b3 ⋯ ⋯ ⋯ bf16 a2 (dropPathOpt N (24 * 56 * 56) (Option.map (fun (f : Fin 9 → Vec N) => f 0) sd) dy3) ∧ enetStridedTiedGAt xN vN epsStr cotN 28 28 w.b4 ⋯ ⋯ ⋯ bf16 a3 dy4 ∧ enetExpTiedGAt xN vN epsStr cotN 28 28 w.b5 ⋯ ⋯ ⋯ bf16 a4 (dropPathOpt N (40 * 28 * 28) (Option.map (fun (f : Fin 9 → Vec N) => f 1) sd) dy5) ∧ enetStridedTiedGAt xN vN epsStr cotN 14 14 w.b6 ⋯ ⋯ ⋯ bf16 a5 dy6 ∧ enetExpTiedGAt xN vN epsStr cotN 14 14 w.b7 ⋯ ⋯ ⋯ bf16 a6 (dropPathOpt N (80 * 14 * 14) (Option.map (fun (f : Fin 9 → Vec N) => f 2) sd) dy7) ∧ enetExpTiedGAt xN vN epsStr cotN 14 14 w.b8 ⋯ ⋯ ⋯ bf16 a7 (dropPathOpt N (80 * 14 * 14) (Option.map (fun (f : Fin 9 → Vec N) => f 3) sd) dy8) ∧ enetExpTiedGAt xN vN epsStr cotN 14 14 w.b9 ⋯ ⋯ ⋯ bf16 a8 dy9 ∧ enetExpTiedGAt xN vN epsStr cotN 14 14 w.b10 ⋯ ⋯ ⋯ bf16 a9 (dropPathOpt N (112 * 14 * 14) (Option.map (fun (f : Fin 9 → Vec N) => f 4) sd) dy10) ∧ enetExpTiedGAt xN vN epsStr cotN 14 14 w.b11 ⋯ ⋯ ⋯ bf16 a10 (dropPathOpt N (112 * 14 * 14) (Option.map (fun (f : Fin 9 → Vec N) => f 5) sd) dy11) ∧ enetStridedTiedGAt xN vN epsStr cotN 7 7 w.b12 ⋯ ⋯ ⋯ bf16 a11 dy12 ∧ enetExpTiedGAt xN vN epsStr cotN 7 7 w.b13 ⋯ ⋯ ⋯ bf16 a12 (dropPathOpt N (192 * 7 * 7) (Option.map (fun (f : Fin 9 → Vec N) => f 6) sd) dy13) ∧ enetExpTiedGAt xN vN epsStr cotN 7 7 w.b14 ⋯ ⋯ ⋯ bf16 a13 ⋯ ∧ ⋯ ∧ ⋯

                    The whole 16-MBConv EfficientNet-B0 train step, tied at the gradient nodes and the smoothed loss. Threading the batched (batch-BN + SE) forward efficientnetForwardBFullDrop — at the optional sites sd (stochastic depth, nine blocks) and cd (classifier dropout), none the drop-free artifacts and some the dropdo one the book's run trains — and the backward cotangent chain built from the block witnesses' .backwards (swish masks, the SE gate fan-in, batch-BN backs, the residual fan-in and the drop site folded into the block VJPs), every gradient node of the stem, all 16 MBConv blocks, the conv-bn-swish head and the dense head denotes the certified batched gradient Σ_n Σ pdiv · cot at the cotangent that chain delivers, the chain's top being smoothedLossCotGraph at the target t. The statement is at one replica's nodes; bf16 selects the conv and depthwise weight nodes' kind — false the f32 artifacts', true the bf16 kinds efficientnetin_emarmsdp64dropdowxeps0001bf16 emits, read over ℝ at the identity rounding (Bf16Erasure); the right-hand side is the same certified gradient at either value. The optimizer update is outside it.