Class HpVal<T>

java.lang.Object
ai.djl.training.hyperparameter.param.Hyperparameter<T>
ai.djl.training.hyperparameter.param.HpVal<T>
Type Parameters:
T - the type of the value

public class HpVal<T> extends Hyperparameter<T>
A Hyperparameter with a known value instead of a range of possible values.

HpVals and HpSets of HpVals are used to represent sampled hyperparameters.

  • Constructor Details

    • HpVal

      public HpVal(String name, T value)
      Cosntructs a new HpVal.
      Parameters:
      name - the name of the hyperparameter
      value - the fixed value of the hyperparameter
  • Method Details

    • random

      public T random()
      Returns a random value for the hyperparameter for a range of a fixed value if it is a HpVal.
      Specified by:
      random in class Hyperparameter<T>
      Returns:
      a random value for the hyperparameter for a range of a fixed value if it is a HpVal
    • toString

      public String toString()
      Overrides:
      toString in class Object