Package ai.djl.training.tracker
Class LinearTracker.Builder
java.lang.Object
ai.djl.training.tracker.LinearTracker.Builder
- Enclosing class:
- LinearTracker
The Builder to construct an
LinearTracker object.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aLinearTrackerblock.optMaxUpdates(int maxUpdates) Sets the maximum number of updates after which the value should remain constant.optMaxValue(float max) Sets the maximum value for a positive slope.optMinValue(float min) Sets the minimum value for a negative slope.optSlope(float slope) Sets the value of the linear slope.setBaseValue(float baseValue) Sets the initial value after no steps.
-
Method Details
-
setBaseValue
Sets the initial value after no steps.- Parameters:
baseValue- the initial value- Returns:
- this
Builder
-
optSlope
Sets the value of the linear slope.Use a positive number for an increasing value and negative for decreasing.
- Parameters:
slope- the value of the linear slope- Returns:
- this
Builder
-
optMaxValue
Sets the maximum value for a positive slope.This is equivalent to the max updates. Only one can be set.
- Parameters:
max- the max value- Returns:
- this
Builder
-
optMinValue
Sets the minimum value for a negative slope.This is equivalent to the max updates. Only one can be set.
- Parameters:
min- the minimum value- Returns:
- this
Builder
-
optMaxUpdates
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
Builds aLinearTrackerblock.- Returns:
- the
LinearTrackerblock
-