OptimizerConfig (Python)
The OptimizerConfig Cython class wraps the C++ optimizer_params_t
struct and is used to configure the optimiser and learning-rate scheduler
when calling Analysis.AddModel.
from AnalysisG.core.lossfx import OptimizerConfig
op = OptimizerConfig()
op.Optimizer = "Adam"
op.Scheduler = "StepLR"
op.lr = 1e-3
op.step_size = 10
op.gamma = 0.5
Optimiser / Scheduler Selection
Property |
Default |
Description |
|---|---|---|
|
|
Optimiser name: |
|
|
LR-scheduler name: |
Hyper-parameter Properties
Property |
Default |
Description |
|---|---|---|
|
|
Learning rate. |
|
|
L2 learning-rate decay (AdaGrad). |
|
|
L2 regularisation weight decay. |
|
|
Numerical stability epsilon (Adam, RMSprop). |
|
|
RMSprop smoothing constant. |
|
|
SGD/RMSprop momentum factor. |
|
|
SGD dampening for momentum. |
|
|
Adam |
|
|
Use AMSGrad variant of Adam. |
|
|
Use Nesterov momentum (SGD). |
|
|
Use centred RMSprop. |
|
|
AdaGrad initial accumulator value. |
|
|
StepLR period in epochs. |
|
|
StepLR/ExponentialLR multiplicative decay factor. |
|
|
LBFGS maximum iterations per step. |
|
|
LBFGS maximum function evaluations per step. |
|
|
LBFGS history size. |
|
|
LBFGS gradient-norm convergence tolerance. |
|
|
LBFGS step-size convergence tolerance. |