Class BaseHpOptimizer
java.lang.Object
ai.djl.training.hyperparameter.optimizer.BaseHpOptimizer
- All Implemented Interfaces:
HpOptimizer
- Direct Known Subclasses:
HpORandom
A base containing shared implementations for
HpOptimizer
s.- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ai.djl.training.hyperparameter.optimizer.HpOptimizer
nextConfig
-
Field Details
-
hyperParams
-
results
-
-
Constructor Details
-
BaseHpOptimizer
Constructs aBaseHpOptimizer
.- Parameters:
hyperParams
- the set of hyperparameters
-
-
Method Details
-
update
Updates the optimizer with the results of a hyperparameter test.- Specified by:
update
in interfaceHpOptimizer
- Parameters:
config
- the tested hyperparametersloss
- the validation loss from training with those hyperparameters
-
getLoss
Returns the recorded loss.- Specified by:
getLoss
in interfaceHpOptimizer
- Parameters:
config
- the hyperparameters that were trained with- Returns:
- the loss
-
getBest
Returns the best hyperparameters and loss.- Specified by:
getBest
in interfaceHpOptimizer
- Returns:
- the best hyperparameters and loss
-