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
HpOptimizers.- 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, waitMethods 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:
updatein interfaceHpOptimizer- Parameters:
config- the tested hyperparametersloss- the validation loss from training with those hyperparameters
-
getLoss
Returns the recorded loss.- Specified by:
getLossin interfaceHpOptimizer- Parameters:
config- the hyperparameters that were trained with- Returns:
- the loss
-
getBest
Returns the best hyperparameters and loss.- Specified by:
getBestin interfaceHpOptimizer- Returns:
- the best hyperparameters and loss
-