xnn.common.models.multilinear#
Multilinear blocks: autograd functions that keep only their operands.
A block f(op_0, ..., op_k) linear in each operand (a sum of terms, each
linear in the operands it contains) is evaluated without recording, and its
derivatives come in closed form from the block itself:
the adjoint
bar f_i(g)of each operand (the gradient for the incoming gradientg), andtheir own derivatives (the second backward of force training). For each term,
<c_i, bar f_i(g)> = <g, f(op_i <- c_i)>, so the derivatives of the adjoints are values and adjoints of the same block with one operand replaced by its cotangent, over the terms that contain it.
Nothing but the operands (and, in a second backward, the incoming gradient) is kept. The blocks can be pair sums written as fused kernels, whose adjoints are kernels of the same form. Third derivatives are not supported. Eager only: custom autograd functions do not script.
Functions
|
|
|
|
Classes
Interface of a block for |