t3_probe_corewise_derivatives_transpose#
- t3toolbox.backend.sampling_derivatives.t3_probe_corewise_derivatives_transpose(ztildes, ww, pp, core_pair, order, sum_over_probes=False, chunk_size=100)#
def t3_probe_corewise_derivatives_transpose( ztildes: typ.Sequence[NDArray], # residual jets, len=d, elm_shape=(order+1)+W+C+(Ni,) 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,) core_pair: typ.Tuple[ typ.Sequence[NDArray], # tucker_cores, len=d, elm_shape=C+(ni,Ni) typ.Sequence[NDArray], # tt_cores, len=d, elm_shape=C+(ri,ni,r(i+1)) ], # = TuckerTensorTrain.data order: int, # highest derivative order sum_over_probes: bool = False, # True: sum the sample stack W (the gradient J^T r) chunk_size: typ.Optional[int] = 100, # W-chunk size for the gradient assembly; None -> dense. docs/chunking.md ) -> typ.Tuple[ typ.Tuple[NDArray, ...], # tucker-core gradients, same shapes as tucker_cores typ.Tuple[NDArray, ...], # tt-core gradients, same shapes as tt_cores ]:
Corewise (non-manifold) transpose of
t3_probe_derivatives(): gradient of the probe-derivative jets w.r.t. the framecore_pair’s cores, as independent variables (for core-wise optimizers). The Section 6.3 substitutionP,Q,O -> Gintotv_probe_derivatives_transpose()(frame(U, G, G, G); orthogonality not required). Returns gradients shaped like(tucker_cores, tt_cores). Verified vsjax.grad.- Parameters:
ztildes (t3toolbox.backend.common.typ.Sequence[NDArray])
ww (t3toolbox.backend.common.typ.Sequence[NDArray])
pp (t3toolbox.backend.common.typ.Sequence[NDArray])
core_pair (t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Sequence[NDArray], t3toolbox.backend.common.typ.Sequence[NDArray]])
order (int)
sum_over_probes (bool)
chunk_size (t3toolbox.backend.common.typ.Optional[int])
- Return type:
t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Tuple[NDArray, Ellipsis], t3toolbox.backend.common.typ.Tuple[NDArray, Ellipsis]]