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 ofHyperparameter
s.
-
-
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 void
add(Hyperparameter<?> hparam)
Adds a hyperparameter to the set.Hyperparameter<?>
getHParam(java.lang.String name)
Returns the hyperparameter in the set with the given name.HpSet
random()
Returns a random value for the hyperparameter for a range of a fixed value if it is aHpVal
.java.lang.String
toString()
-
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:
random
in 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:
toString
in classjava.lang.Object
-
-