Package ai.djl.training.optimizer
Class AdamW.Builder
java.lang.Object
ai.djl.training.optimizer.Optimizer.OptimizerBuilder<AdamW.Builder>
ai.djl.training.optimizer.AdamW.Builder
- Enclosing class:
- AdamW
The Builder to construct an
AdamW
object.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aAdamW
block.optBeta1
(float beta1) Sets the decay rate for the first moment estimates.optBeta2
(float beta2) Sets the decay rate for the second moment estimates.optEpsilon
(float epsilon) Sets \(epsilon\) - a small quantity for numerical stability.optLearningRateTracker
(ParameterTracker learningRateTracker) Sets theParameterTracker
for this optimizer.protected AdamW.Builder
self()
Methods inherited from class ai.djl.training.optimizer.Optimizer.OptimizerBuilder
optBeginNumUpdate, optClipGrad, optWeightDecays, setRescaleGrad
-
Method Details
-
self
- Specified by:
self
in classOptimizer.OptimizerBuilder<AdamW.Builder>
-
optLearningRateTracker
Sets theParameterTracker
for this optimizer.- Parameters:
learningRateTracker
- theParameterTracker
to be set- Returns:
- this
Builder
-
optBeta1
Sets the decay rate for the first moment estimates.- Parameters:
beta1
- the deacay rate for the the first moment estimates- Returns:
- this
Builder
-
optBeta2
Sets the decay rate for the second moment estimates.- Parameters:
beta2
- the decay rate for the the second moment estimates- Returns:
- this
Builder
-
optEpsilon
Sets \(epsilon\) - a small quantity for numerical stability.- Parameters:
epsilon
- a small quantity for numerical stability- Returns:
- this
Builder
-
build
Builds aAdamW
block.- Returns:
- the
AdamW
block
-