public abstract class BaseHpOptimizer extends java.lang.Object implements HpOptimizer
HpOptimizers.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, waitnextConfigprotected 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 HpOptimizerconfig - the tested hyperparametersloss - the validation loss from training with those hyperparameterspublic float getLoss(HpSet config)
getLoss in interface HpOptimizerconfig - the hyperparameters that were trained withpublic ai.djl.util.Pair<HpSet,java.lang.Float> getBest()
getBest in interface HpOptimizer