Package ai.djl.training.tracker
Interface Tracker
- All Superinterfaces:
ParameterTracker
- All Known Implementing Classes:
CosineTracker
,CyclicalTracker
,FactorTracker
,LinearTracker
,MultiFactorTracker
,PolynomialDecayTracker
,WarmUpTracker
A
Tracker
represents a hyperparameter that changes gradually through the training
process.-
Method Summary
Modifier and TypeMethodDescriptionstatic CosineTracker.Builder
cosine()
Returns a new instance ofCosineTracker.Builder
that can build anCosineTracker
.static CyclicalTracker.Builder
cyclical()
Returns a new instance ofCyclicalTracker.Builder
that can build anCyclicalTracker
.static FactorTracker.Builder
factor()
Returns a new instance ofFactorTracker.Builder
that can build anFactorTracker
.static Tracker
fixed
(float value) Returns a new instance ofTracker
with a fixed value.float
getNewValue
(int numUpdate) Fetches the value after the given number of steps/updates.default float
getNewValue
(String parameterId, int numUpdate) Fetches the value after the given number of steps/updates for the parameter.static MultiFactorTracker.Builder
Returns a new instance ofMultiFactorTracker.Builder
that can build anMultiFactorTracker
.static WarmUpTracker.Builder
warmUp()
Returns a new instance ofWarmUpTracker.Builder
that can build anWarmUpTracker
.
-
Method Details
-
getNewValue
float getNewValue(int numUpdate) Fetches the value after the given number of steps/updates.- Parameters:
numUpdate
- the total number of steps/updates- Returns:
- this
Builder
-
getNewValue
Fetches the value after the given number of steps/updates for the parameter.- Specified by:
getNewValue
in interfaceParameterTracker
- Parameters:
parameterId
- the id of the parameter to get the new value fornumUpdate
- the total number of steps/updates- Returns:
- this
Builder
-
factor
Returns a new instance ofFactorTracker.Builder
that can build anFactorTracker
.- Returns:
- the
FactorTracker
FactorTracker.Builder
-
warmUp
Returns a new instance ofWarmUpTracker.Builder
that can build anWarmUpTracker
.- Returns:
- the
WarmUpTracker
WarmUpTracker.Builder
-
multiFactor
Returns a new instance ofMultiFactorTracker.Builder
that can build anMultiFactorTracker
.- Returns:
- the
MultiFactorTracker
MultiFactorTracker.Builder
-
cosine
Returns a new instance ofCosineTracker.Builder
that can build anCosineTracker
.- Returns:
- the
CosineTracker
CosineTracker.Builder
-
cyclical
Returns a new instance ofCyclicalTracker.Builder
that can build anCyclicalTracker
.- Returns:
- the
CyclicalTracker
CyclicalTracker.Builder
-
fixed
Returns a new instance ofTracker
with a fixed value.- Parameters:
value
- the fixed value- Returns:
- an instance of
Tracker
with a fixed value
-