Class HpSet
- java.lang.Object
-
- ai.djl.training.hyperparameter.param.Hyperparameter<HpSet>
-
- ai.djl.training.hyperparameter.param.HpSet
-
public final class HpSet extends Hyperparameter<HpSet>
A nestable set ofHyperparameters.
-
-
Field Summary
-
Fields inherited from class ai.djl.training.hyperparameter.param.Hyperparameter
name
-
-
Constructor Summary
Constructors Constructor Description HpSet(java.lang.String name)Cosntructs a new emptyHpSet.HpSet(java.lang.String name, java.util.List<Hyperparameter<?>> hyperParams)Cosntructs a newHpSet.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Hyperparameter<?> hparam)Adds a hyperparameter to the set.Hyperparameter<?>getHParam(java.lang.String name)Returns the hyperparameter in the set with the given name.HpSetrandom()Returns a random value for the hyperparameter for a range of a fixed value if it is aHpVal.java.lang.StringtoString()-
Methods inherited from class ai.djl.training.hyperparameter.param.Hyperparameter
getName
-
-
-
-
Constructor Detail
-
HpSet
public HpSet(java.lang.String name, java.util.List<Hyperparameter<?>> hyperParams)Cosntructs a newHpSet.- Parameters:
name- the name of the hyperparameter sethyperParams- the included hyperparameters in the set
-
HpSet
public HpSet(java.lang.String name)
Cosntructs a new emptyHpSet.- Parameters:
name- the name of the hyperparameter set
-
-
Method Detail
-
add
public void add(Hyperparameter<?> hparam)
Adds a hyperparameter to the set.- Parameters:
hparam- the hyperparameter to add
-
getHParam
public Hyperparameter<?> getHParam(java.lang.String name)
Returns the hyperparameter in the set with the given name.- Parameters:
name- the name of the hyperparameter to return- Returns:
- the hyperparameter
-
random
public HpSet random()
Returns a random value for the hyperparameter for a range of a fixed value if it is aHpVal.- Specified by:
randomin classHyperparameter<HpSet>- Returns:
- a random value for the hyperparameter for a range of a fixed value if it is a
HpVal
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-