Package ai.djl.training.tracker
Class FactorTracker.Builder
- java.lang.Object
-
- ai.djl.training.tracker.FactorTracker.Builder
-
- Enclosing class:
- FactorTracker
public static final class FactorTracker.Builder extends java.lang.ObjectThe Builder to construct anFactorTrackerobject.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FactorTrackerbuild()Builds aFactorTrackerblock.FactorTracker.BuilderoptMaxUpdates(int maxUpdates)Sets the maximum number of updates after which the value should remain constant.FactorTracker.BuilderoptMinValue(float min)Sets the minimum value.FactorTracker.BuildersetBaseValue(float baseValue)Sets the initial value after no steps.FactorTracker.BuildersetFactor(float factor)Sets the value of the multiplicative factor.
-
-
-
Method Detail
-
setBaseValue
public FactorTracker.Builder setBaseValue(float baseValue)
Sets the initial value after no steps.- Parameters:
baseValue- the initial value- Returns:
- this
Builder
-
setFactor
public FactorTracker.Builder setFactor(float factor)
Sets the value of the multiplicative factor.- Parameters:
factor- the value of the multiplicative factor- Returns:
- this
Builder
-
optMinValue
public FactorTracker.Builder optMinValue(float min)
Sets the minimum value.This is equivalent to the max updates. Only one can be set.
- Parameters:
min- the minimum value- Returns:
- this
Builder
-
optMaxUpdates
public FactorTracker.Builder optMaxUpdates(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 FactorTracker build()
Builds aFactorTrackerblock.- Returns:
- the
FactorTrackerblock
-
-