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.ObjectThe Builder to construct anCosineTrackerobject.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CosineTrackerbuild()Builds aCosineTrackerblock.CosineTracker.BuilderoptFinalValue(float finalValue)Sets the final value that the learning rate will remain constant as after the specified max number of updates.CosineTracker.BuildersetBaseValue(float baseValue)Sets the initial value after no steps.CosineTracker.BuildersetMaxUpdates(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 aCosineTrackerblock.- Returns:
- the
CosineTrackerblock
-
-