eazygrad.Adam

class eazygrad.Adam(parameters: Sequence[_Tensor], lr: float = 0.001, betas: tuple[float, float] = (0.9, 0.99), eps: float = 1e-08)[source]

Bases: Optimizer

Adam optimizer.

Parameters:
  • parameters (sequence of _Tensor) – Iterable of tensors to optimize.

  • lr (float, default=1e-3) – Learning rate.

  • betas (tuple of float, default=(0.9, 0.99)) – Coefficients used for the running averages of the gradient and squared gradient.

  • eps (float, default=1e-8) – Small value added for numerical stability.

Notes

The optimizer maintains per-parameter first and second moment estimates and uses bias correction during the update step.

See also

torch.optim.Adam