Package ai.djl.training.tracker
Class CosineTracker.Builder
- java.lang.Object
-
- ai.djl.training.tracker.CosineTracker.Builder
-
- Enclosing class:
- CosineTracker
public static final class CosineTracker.Builder extends java.lang.Object
The Builder to construct anCosineTracker
object.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CosineTracker
build()
Builds aCosineTracker
block.CosineTracker.Builder
optFinalValue(float finalValue)
Sets the final value that the learning rate will remain constant as after the specified max number of updates.CosineTracker.Builder
setBaseValue(float baseValue)
Sets the initial value after no steps.CosineTracker.Builder
setMaxUpdates(int maxUpdates)
Sets the maximum number of updates after which the value should remain constant.
-
-
-
Method Detail
-
setBaseValue
public CosineTracker.Builder setBaseValue(float baseValue)
Sets the initial value after no steps.- Parameters:
baseValue
- the initial value- Returns:
- this
Builder
-
optFinalValue
public CosineTracker.Builder optFinalValue(float finalValue)
Sets the final value that the learning rate will remain constant as after the specified max number of updates.- Parameters:
finalValue
- the final value- Returns:
- this
Builder
-
setMaxUpdates
public CosineTracker.Builder setMaxUpdates(int maxUpdates)
Sets the maximum number of updates after which the value should remain constant.- Parameters:
maxUpdates
- the maximum number of updates after which the value should remain constant- Returns:
- this
Builder
-
build
public CosineTracker build()
Builds aCosineTracker
block.- Returns:
- the
CosineTracker
block
-
-