pytc.vmc.optimizer.NewtonOptimizer¶
- class pytc.vmc.optimizer.NewtonOptimizer(value_and_grad_func, learning_rate, damping=0.001, maxiter=100, curvature_type='fisher', max_vmap_batch_size=0, solver='exact', solve_kwargs=None, jacobian_sample_size=0, clip_multiplier=5.0)[source]¶
Bases:
objectNewton Optimizer (formerly Matrix-Free Optimizer).
Supports:
Stochastic Reconfiguration (SR) / Natural Gradient for Energy Minimization (curvature=”fisher”)
Gauss-Newton for Variance Minimization (curvature=”gauss_newton”)
Solvers:
“cg”: Conjugate Gradient (iterative, matrix-free)
“exact” or “cholesky”: Exact matrix inversion
Methods
__delattr__Implement delattr(self, name).
__dir__Default dir() implementation.
__eq__Return self==value.
__format__Default object formatter.
__ge__Return self>=value.
__getattribute__Return getattr(self, name).
__getstate__Helper for pickle.
__gt__Return self>value.
__hash__Return hash(self).
__init____init_subclass__This method is called when a class is subclassed.
__le__Return self<=value.
__lt__Return self<value.
__ne__Return self!=value.
__new____reduce__Helper for pickle.
__reduce_ex__Helper for pickle.
__repr__Return repr(self).
__setattr__Implement setattr(self, name, value).
__sizeof__Size of object in memory, in bytes.
__str__Return str(self).
__subclasshook__Abstract classes can override this to customize issubclass().
_flatten_jacobianFlatten a per-walker Jacobian pytree to an
(N, P)matrix._get_effective_batch_sizeReturn a batch size compatible with the current execution mode.
_get_unbatched_vmapReturn a per-batch vmap without nested folx batching.
_get_vmapReturn the appropriate vmap implementation.
_pad_walkers_to_batch_multiplePad walkers along axis 0 so they reshape cleanly into batches.
_slice_walkersSlice a walker pytree along the walker dimension.
Attributes
__annotations____dict____doc____module____weakref__list of weak references to the object