t3_apply_corewise_hessian_from_sweep#
- t3toolbox.backend.apply.t3_apply_corewise_hessian_from_sweep(c, ww, core_pair, core_directions, frame_sweep)#
def t3_apply_corewise_hessian_from_sweep( c: NDArray, # residual (omega^2 applied), shape=W+C ww: typ.Union[typ.Sequence[NDArray], NDArray], # apply vectors, len=d, elm_shape=W+(Ni,) core_pair: typ.Tuple[ typ.Sequence[NDArray], # tucker_cores of theta. len=d, elm_shape=C+(ni,Ni) typ.Sequence[NDArray], # tt_cores of theta. len=d, elm_shape=C+(ri,ni,r(i+1)) ], # = TuckerTensorTrain.data core_directions: typ.Tuple[ typ.Sequence[NDArray], # Tucker directions theta_hat. len=d, elm_shape=K+C+(ni,Ni) typ.Sequence[NDArray], # TT directions theta_hat. len=d, elm_shape=K+C+(ri,ni,r(i+1)) ], frame_sweep: typ.Tuple[typ.Sequence[NDArray], typ.Sequence[NDArray]], # (xis, mus) of theta ) -> typ.Tuple[ typ.Tuple[NDArray, ...], # Tucker block of K theta_hat. len=d, elm_shape=K+C+(ni,Ni) typ.Tuple[NDArray, ...], # TT block of K theta_hat. len=d, elm_shape=K+C+(ri,ni,r(i+1)) ]:
t3_apply_corewise_hessian()reusing a precomputed leanframe_sweep– the reuse hook for a local model.tv_precompute_apply_frame_sweep()is the same at the manifold frame(D, U, L, R)and at the corewise frame(D, L, L, L)of its base pointtheta = (D, L)(xithroughD,muthroughL), so the model’s own sweep is reused; it must becore_pair’s own, which nothing here checks.- Parameters:
c (NDArray)
ww (t3toolbox.backend.common.typ.Union[t3toolbox.backend.common.typ.Sequence[NDArray], NDArray])
core_pair (t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Sequence[NDArray], t3toolbox.backend.common.typ.Sequence[NDArray]])
core_directions (t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Sequence[NDArray], t3toolbox.backend.common.typ.Sequence[NDArray]])
frame_sweep (t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Sequence[NDArray], t3toolbox.backend.common.typ.Sequence[NDArray]])
- Return type:
t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Tuple[NDArray, …], t3toolbox.backend.common.typ.Tuple[NDArray, …]]