Last-axis softmax and log-softmax tape nodes #
Softmax and log-softmax over matrix rows, together with their Jacobian/VJP lemmas and
NodeFDerivCorrect wrappers for graph-level autograd proofs.
Flattened size for an m×n matrix when viewed as a single vector (m*n).
Instances For
Row recovered from a flat index built by finProdFinEquiv.
Together with modNat_finProdFinEquiv this is the row-major convention spelled out: pairing then
dividing gets you back where you started. Both are simp lemmas so rows/unrows round-trip
without any manual index juggling.
Column recovered from a flat index built by finProdFinEquiv.
HasFDerivAt statement for forwardMN, using the rowwise softmax derivative.
Reuse the m*n flattened size from SoftmaxLastAxis.
Instances For
HasFDerivAt statement for logSoftmaxVec applied rowwise.
Tape node for applying softmaxVec along the last axis of an m×n matrix (rowwise).
Instances For
Tape node for applying logSoftmaxVec along the last axis of an m×n matrix (rowwise).
Instances For
NodeFDerivCorrect for softmaxLast (rowwise softmax).
Instances For
NodeFDerivCorrect for logSoftmaxLast (rowwise log-softmax).