public abstract class BaseHpOptimizer extends java.lang.Object implements HpOptimizer
HpOptimizer
s.HpOptimizer
Modifier and Type | Field and Description |
---|---|
protected HpSet |
hyperParams |
protected java.util.Map<HpSet,java.lang.Float> |
results |
Constructor and Description |
---|
BaseHpOptimizer(HpSet hyperParams)
Constructs a
BaseHpOptimizer . |
Modifier and Type | Method and Description |
---|---|
ai.djl.util.Pair<HpSet,java.lang.Float> |
getBest()
Returns the best hyperparameters and loss.
|
float |
getLoss(HpSet config)
Returns the recorded loss.
|
void |
update(HpSet config,
float loss)
Updates the optimizer with the results of a hyperparameter test.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
nextConfig
protected HpSet hyperParams
protected java.util.Map<HpSet,java.lang.Float> results
public BaseHpOptimizer(HpSet hyperParams)
BaseHpOptimizer
.hyperParams
- the set of hyperparameterspublic void update(HpSet config, float loss)
update
in interface HpOptimizer
config
- the tested hyperparametersloss
- the validation loss from training with those hyperparameterspublic float getLoss(HpSet config)
getLoss
in interface HpOptimizer
config
- the hyperparameters that were trained withpublic ai.djl.util.Pair<HpSet,java.lang.Float> getBest()
getBest
in interface HpOptimizer