gradient_descent ================ .. py:function:: t3toolbox.backend.optimizers.gradient_descent(problem, x0, n_iter = 100, gtol_rel = 1e-08, c_armijo = 0.0001) .. code-block:: python def gradient_descent( problem: Problem, # the fixed-rank least-squares problem x0: Tangent, # initial cores (U, G) n_iter: int = 100, gtol_rel: float = 1e-8, # stop when ‖g‖ <= gtol_rel * ‖g_0‖ c_armijo: float = 1e-4, # Armijo sufficient-decrease constant ) -> typ.Tuple[Tangent, dict]: # (x_cores, stats) Steepest descent with a Cauchy initial step and an **Armijo backtracking line search**. The step length starts at the Cauchy value ``α = ‖g‖² / ‖𝒥g‖²`` (the 1D minimizer of the local GN quadratic along ``−g``) and backtracks (``α ← α/2``) until ``f(retract(−α g)) ≤ f − c·α‖g‖²`` -- so it descends on any geometry, including the additive corewise chart where a bare Cauchy step overshoots the high-degree objective. Exercises the whole backend-first stack (``gradient`` / ``gn_quadratic`` / ``objective`` / ``retract``). (Eager; the jit kernel + the `xwhile` line search come in G3.3/G3.4.)