Interface HpOptimizer

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      ai.djl.util.Pair<HpSet,​java.lang.Float> getBest()
      Returns the best hyperparameters and loss.
      float getLoss​(HpSet config)
      Returns the recorded loss.
      HpSet nextConfig()
      Returns the next hyperparameters to test.
      void update​(HpSet config, float loss)
      Updates the optimizer with the results of a hyperparameter test.
    • Method Detail

      • nextConfig

        HpSet nextConfig()
        Returns the next hyperparameters to test.
        Returns:
        the hyperparameters to test
      • update

        void update​(HpSet config,
                    float loss)
        Updates the optimizer with the results of a hyperparameter test.
        Parameters:
        config - the tested hyperparameters
        loss - the validation loss from training with those hyperparameters
      • getLoss

        float getLoss​(HpSet config)
        Returns the recorded loss.
        Parameters:
        config - the hyperparameters that were trained with
        Returns:
        the loss
        Throws:
        java.util.NoSuchElementException - if the hyperparameters were not trained with before
      • getBest

        ai.djl.util.Pair<HpSet,​java.lang.Float> getBest()
        Returns the best hyperparameters and loss.
        Returns:
        the best hyperparameters and loss