Package ai.djl.training.optimizer
Class Adam.Builder
- java.lang.Object
-
- ai.djl.training.optimizer.Optimizer.OptimizerBuilder<Adam.Builder>
-
- ai.djl.training.optimizer.Adam.Builder
-
- Enclosing class:
- Adam
public static final class Adam.Builder extends Optimizer.OptimizerBuilder<Adam.Builder>
The Builder to construct anAdam
object.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Adam
build()
Builds aAdam
block.Adam.Builder
optBeta1(float beta1)
Sets the decay rate for the first moment estimates.Adam.Builder
optBeta2(float beta2)
Sets the decay rate for the second moment estimates.Adam.Builder
optEpsilon(float epsilon)
Sets \(epsilon\) - a small quantity for numerical stability.Adam.Builder
optLearningRateTracker(ParameterTracker learningRateTracker)
Sets theParameterTracker
for this optimizer.protected Adam.Builder
self()
-
Methods inherited from class ai.djl.training.optimizer.Optimizer.OptimizerBuilder
optBeginNumUpdate, optClipGrad, optWeightDecays, setRescaleGrad
-
-
-
-
Method Detail
-
self
protected Adam.Builder self()
- Specified by:
self
in classOptimizer.OptimizerBuilder<Adam.Builder>
-
optLearningRateTracker
public Adam.Builder optLearningRateTracker(ParameterTracker learningRateTracker)
Sets theParameterTracker
for this optimizer.- Parameters:
learningRateTracker
- theParameterTracker
to be set- Returns:
- this
Builder
-
optBeta1
public Adam.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 Adam.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 Adam.Builder optEpsilon(float epsilon)
Sets \(epsilon\) - a small quantity for numerical stability.- Parameters:
epsilon
- a small quantity for numerical stability- Returns:
- this
Builder
-
-