EfficientNet's per-block batched VJPs #
The batched block forwards of B0 at the index N·(c·h·w) the forward graph (EfficientNetStagesPC)
uses, each with a HasVJP composed by vjpComp from the batched stage VJPs (Batched.Stages:
cbsBHasVJP, dwbsBHasVJP, dwbsSXlaBHasVJP, seBHasVJP, projBHasVJP, and batchMapHasVJP for
the per-example ops), and a _differentiable lemma for each:
mbNoExpFwdBHasVJP— MBConv1, no expansion:dw-bn-swish → SE → project-bn.mbStridedFwdBHasVJP— MBConv6 with a stride-2 depthwise.mbExpFwdBHasVJP— MBConv6 at stride 1 without the skip (mbExpFwdB, defined here).mbResidFwdBHasVJP— MBConv6 at stride 1 with the identity skip (residualHasVJP).headFwdBHasVJP—1×1 conv-bn-swish → GAP → dense.
Batch BatchNorm (bnBatchLA) is the one batch-coupled op; it sits inside the stage VJPs. swish is
smooth, so every block has a global HasVJP.
MBConv1 (no expand), dw-bn-swish → SE → project-bn, is differentiable.
The VJP of MBConv1 (no expand): the three stages' VJPs composed.
Equations
- One or more equations did not get rendered due to their size.
Instances For
MBConv6 strided, expand-bn-swish → strided dw-bn-swish → SE → project-bn, is differentiable.
The VJP of the strided MBConv6: the four stages' VJPs composed.
Equations
- One or more equations did not get rendered due to their size.
Instances For
MBConv6 expand, stride-1, NO residual (stages 5/7's first block, ic ≠ oc): 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
The stride-1 MBConv6 without the skip is differentiable.
The VJP of the stride-1 MBConv6 without the skip: the four stages' VJPs composed.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The residual MBConv6, x + (project-bn ∘ SE ∘ dw-bn-swish ∘ expand-bn-swish)(x), is differentiable.
The VJP of the residual MBConv6: residualHasVJP over mbExpFwdBHasVJP.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The VJP of the head: the conv stage's, then the per-example GAP's and dense's.
Equations
- One or more equations did not get rendered due to their size.