Class HpFloat

java.lang.Object
ai.djl.training.hyperparameter.param.Hyperparameter<Float>
ai.djl.training.hyperparameter.param.HpFloat

public class HpFloat extends Hyperparameter<Float>
A Hyperparameter for a float.
  • Constructor Details

    • HpFloat

      public HpFloat(String name, float lower, float upper, boolean log)
      Constructs a HpFloat.
      Parameters:
      name - the name of the hyperparameter
      lower - the lower bound (inclusive)
      upper - the upper bound (exclusive)
      log - whether to use log space. This is useful if your bounds cover different orders of magnitude (e.g. 1E-5 to 1E-2) instead of same magnitude (e.g. 2 to 5).
  • Method Details

    • random

      public Float 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<Float>
      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