NewtonInfo ========== .. py:class:: t3toolbox.backend.optimizers.NewtonInfo Per-iteration diagnostics passed to a ``newton_cg`` ``callback`` -- everything one Newton step produces, so a custom callback (or the display in :py:mod:`t3toolbox.backend.optimizer_display`) can report anything without the loop anticipating it. ``x_cores`` (the point *before* the step) and ``lm`` (its :py:class:`LocalModel` -- residual / sample / frame) are carried so a callback can compute per-block errors or evaluate a validation forward. The step-related fields are ``None`` on the final **converged** line (no CG / line search ran). The scalar subset (all but ``x_cores`` / ``lm``) is what lands in ``stats['history']``. .. py:attribute:: iteration :type: int .. py:attribute:: objective :type: float .. py:attribute:: gnorm :type: float .. py:attribute:: g0norm :type: float .. py:attribute:: converged :type: bool .. py:attribute:: x_cores :type: t3toolbox.backend.common.typ.Any :value: None .. py:attribute:: lm :type: t3toolbox.backend.common.typ.Any :value: None .. py:attribute:: misfit :type: t3toolbox.backend.common.typ.Optional[float] :value: None .. py:attribute:: regularization :type: t3toolbox.backend.common.typ.Optional[float] :value: None .. py:attribute:: forcing_eta :type: t3toolbox.backend.common.typ.Optional[float] :value: None .. py:attribute:: cg_tol :type: t3toolbox.backend.common.typ.Optional[float] :value: None .. py:attribute:: cg_iters :type: t3toolbox.backend.common.typ.Optional[int] :value: None .. py:attribute:: cg_maxiter :type: t3toolbox.backend.common.typ.Optional[int] :value: None .. py:attribute:: cg_resid :type: t3toolbox.backend.common.typ.Optional[float] :value: None .. py:attribute:: cg_converged :type: t3toolbox.backend.common.typ.Optional[bool] :value: None .. py:attribute:: cg_truncated :type: t3toolbox.backend.common.typ.Optional[bool] :value: None .. py:attribute:: ls_steps :type: t3toolbox.backend.common.typ.Optional[int] :value: None .. py:attribute:: alpha :type: t3toolbox.backend.common.typ.Optional[float] :value: None .. py:attribute:: slope :type: t3toolbox.backend.common.typ.Optional[float] :value: None .. py:attribute:: pHp :type: t3toolbox.backend.common.typ.Optional[float] :value: None .. py:attribute:: delta_f :type: t3toolbox.backend.common.typ.Optional[float] :value: None .. py:attribute:: rho :type: t3toolbox.backend.common.typ.Optional[float] :value: None .. py:attribute:: step_rel :type: t3toolbox.backend.common.typ.Optional[float] :value: None .. py:attribute:: wall_time :type: t3toolbox.backend.common.typ.Optional[float] :value: None