assemble_tucker_tangent_variation_jets#
- t3toolbox.backend.sampling_derivatives.assemble_tucker_tangent_variation_jets(ztildes, dxi_tildes_dot, ww, pp, eta_jets_dot, n_probe, chunk_size=DEFAULT_CHUNK_SIZE)#
def assemble_tucker_tangent_variation_jets( ztildes: typ.Sequence[NDArray], # residual jets, len=d, elm_shape=(order+1,)+W+C+(Ni,) dxi_tildes_dot: typ.Sequence[NDArray], # len=d, elm_shape=(2,)+W+K+C+(ni,): the two read rows ww: typ.Sequence[NDArray], # probe vectors X, len=d, elm_shape=W+(Ni,) pp: typ.Sequence[NDArray], # perturbation vectors P, len=d, elm_shape=W+(Ni,) eta_jets_dot: typ.Sequence[NDArray], # len=d, elm_shape=(order+1,)+W+K+C+(ni,) n_probe: int, # len(W) chunk_size: typ.Optional[int] = DEFAULT_CHUNK_SIZE, # W-chunk size; None (or >= W) -> dense ) -> typ.Tuple[NDArray, ...]: # dB. len=d, elm_shape=K+C+(ni,Ni) (W summed)
The derivative of the Tucker variation-gradient assembly (W summed).
sum_t etadot^(t) (x) z~^(t) + sum_u dxi~dot^(u) (x) w^(u)(the residual and the ambient input jet are fixed; the autosummary first line above stays literal-free on purpose). W-chunked exactly asassemble_tucker_variation_jets()(on the uniform path – alax.scanon jax, where the memory win is, an eager loop on numpy; ragged,NoneandW <= chunk_sizerun dense); see Memory chunking of the derivative transpose (chunk_size).- Parameters:
ztildes (t3toolbox.backend.common.typ.Sequence[NDArray])
dxi_tildes_dot (t3toolbox.backend.common.typ.Sequence[NDArray])
ww (t3toolbox.backend.common.typ.Sequence[NDArray])
pp (t3toolbox.backend.common.typ.Sequence[NDArray])
eta_jets_dot (t3toolbox.backend.common.typ.Sequence[NDArray])
n_probe (int)
chunk_size (t3toolbox.backend.common.typ.Optional[int])
- Return type:
t3toolbox.backend.common.typ.Tuple[NDArray, …]