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
public static final class AdamW.Builder extends Optimizer.OptimizerBuilder<AdamW.Builder>
The Builder to construct anAdamWobject.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AdamWbuild()Builds aAdamWblock.AdamW.BuilderoptBeta1(float beta1)Sets the decay rate for the first moment estimates.AdamW.BuilderoptBeta2(float beta2)Sets the decay rate for the second moment estimates.AdamW.BuilderoptEpsilon(float epsilon)Sets \(epsilon\) - a small quantity for numerical stability.AdamW.BuilderoptLearningRateTracker(ParameterTracker learningRateTracker)Sets theParameterTrackerfor this optimizer.protected AdamW.Builderself()-
Methods inherited from class ai.djl.training.optimizer.Optimizer.OptimizerBuilder
optBeginNumUpdate, optClipGrad, optWeightDecays, setRescaleGrad
-
-
-
-
Method Detail
-
self
protected AdamW.Builder self()
- Specified by:
selfin classOptimizer.OptimizerBuilder<AdamW.Builder>
-
optLearningRateTracker
public AdamW.Builder optLearningRateTracker(ParameterTracker learningRateTracker)
Sets theParameterTrackerfor this optimizer.- Parameters:
learningRateTracker- theParameterTrackerto be set- Returns:
- this
Builder
-
optBeta1
public AdamW.Builder optBeta1(float beta1)
Sets the decay rate for the first moment estimates.- Parameters:
beta1- the deacay rate for the the first moment estimates- Returns:
- this
Builder
-
optBeta2
public AdamW.Builder optBeta2(float beta2)
Sets the decay rate for the second moment estimates.- Parameters:
beta2- the decay rate for the the second moment estimates- Returns:
- this
Builder
-
optEpsilon
public AdamW.Builder optEpsilon(float epsilon)
Sets \(epsilon\) - a small quantity for numerical stability.- Parameters:
epsilon- a small quantity for numerical stability- Returns:
- this
Builder
-
-