Skip to content

Gradient-Based API ​

API reference for the 11 classes of opt.gradient_based. This page is generated from the source; see the algorithm pages for formulations and references.

Imports ​

python
from opt.gradient_based import (
    AdamW,
    AdaMax,
    AdaDelta,
    ADAGrad,
    ADAMOptimization,
    AMSGrad,
    NesterovAcceleratedGradient,
    Nadam,
    RMSprop,
    SGDMomentum,
    SGD,
)

Common interface ​

Every class takes the objective func, the search-space lower_bound, upper_bound and dim, usually max_iter and seed, and implements search() -> tuple[np.ndarray, float]. See AbstractOptimizer.

Classes ​

ClassAlgorithmAdditional parameters
AdamWAdam with Decoupled Weight Decaylearning_rate=ADAMW_LEARNING_RATE, beta1=ADAM_BETA1, beta2=ADAM_BETA2, epsilon=ADAM_EPSILON, weight_decay=ADAMW_WEIGHT_DECAY
AdaMaxAdamaxlearning_rate=0.002, beta1=0.9, beta2=0.999, epsilon=1e-08
AdaDeltaAdaptive Deltarho=0.97, eps=1e-08
ADAGradAdaptive Gradient Algorithmlr=0.01, eps=1e-08
ADAMOptimizationAdaptive Moment Estimationalpha=0.001, beta1=0.9, beta2=0.999, epsilon=1e-13
AMSGradAMSGradlearning_rate=0.001, beta1=0.9, beta2=0.999, epsilon=1e-08
NesterovAcceleratedGradientNesterov Accelerated Gradientlearning_rate=0.01, momentum=0.9
NadamNesterov-accelerated Adaptive Momentlearning_rate=NADAM_LEARNING_RATE, beta1=ADAM_BETA1, beta2=ADAM_BETA2, epsilon=ADAM_EPSILON
RMSpropRoot Mean Square Propagationlearning_rate=0.01, rho=0.9, epsilon=1e-08
SGDMomentumSGD with Momentumlearning_rate=0.01, momentum=0.9
SGDStochastic Gradient Descentlearning_rate=0.01

Released under the MIT License.