Adam#

Adam on Estimated Gradients#

Momentum-based optimizer (Adam) applied to estimated gradients produced by an external estimator (e.g., FD or SPSA) or provided directly in context.

Interface:
  • initialize(params) -> state

  • step_params(model, params, context) -> (new_params, state)

Context options:
  • context[“grads”]: dict aligned with params (if provided, used directly)

  • or pass a grad_estimator(model, params, context) -> np.ndarray in ctor

class qmlhc.optim.numpy_optim.adam.HCAdam(lr=0.01, beta1=0.9, beta2=0.999, eps=1e-08, clip=None, grad_estimator=None)[source]#

Bases: object

Adam optimizer over externally estimated gradients.

initialize(params)[source]#
Return type:

Dict[str, Any]

step_params(model, params, context)[source]#
Return type:

Tuple[Dict[str, Any], Dict[str, Any]]