Class LossCurve


  • public class LossCurve
    extends Object
    • Constructor Detail

      • LossCurve

        public LossCurve​(List<Loss> losses)
      • LossCurve

        public LossCurve​(double[] lossValues,
                         List<String> lossNames)
    • Method Detail

      • meanLoss

        public Loss meanLoss​(int epoch)
        Get the mean loss for a given epoch If epoch is negative, counts backwards from the end. E.g. losses(-1) gets the last epoch.
        Parameters:
        epoch - The epoch to get. If negative, returns results for the epoch that many epochs from the end
      • lastMeanLoss

        public Loss lastMeanLoss()
        Get the mean loss for the last epoch.
      • meanLoss

        public float[] meanLoss​(@NonNull
                                @NonNull String lossName)
        Return all mean loss values for a given variable
      • meanLoss

        public float[] meanLoss​(@NonNull
                                @NonNull SDVariable loss)
        Return all mean loss values for a given variable
      • meanLoss

        public float meanLoss​(@NonNull
                              @NonNull String lossName,
                              int epoch)
        Return the mean loss value for a given variable on a given epoch. See meanLoss(int)
      • meanLoss

        public float meanLoss​(@NonNull
                              @NonNull SDVariable loss,
                              int epoch)
        Return the mean loss value for a given variable on a given epoch. See meanLoss(int)
      • lastMeanLoss

        public float lastMeanLoss​(@NonNull
                                  @NonNull String lossName)
        Return the mean loss value for a given variable on the last epoch.
      • lastMeanLoss

        public float lastMeanLoss​(@NonNull
                                  @NonNull SDVariable loss)
        Return the mean loss value for a given variable on the last epoch.
      • lastMeanDelta

        public Loss lastMeanDelta()
        Return the loss delta between the last epoch and the one before it. Equivalent to meanLoss(-1) - meanLoss(-2). A positive delta means the loss is increasing, and a negative delta means it is decreasing.
      • lastMeanDelta

        public double lastMeanDelta​(String lossName)
        Return the loss delta between the last epoch and the one before it, for a given variable. Equivalent to meanLoss(-1) - meanLoss(-2). A positive delta means the loss is increasing, and a negative delta means it is decreasing.
      • lastMeanDelta

        public double lastMeanDelta​(SDVariable loss)
        Return the loss delta between the last epoch and the one before it, for a given variable. Equivalent to meanLoss(-1) - meanLoss(-2). A positive delta means the loss is increasing, and a negative delta means it is decreasing.
      • addLossAndCopy

        public LossCurve addLossAndCopy​(Loss loss)
        Return a new LossCurve with the given losses added on as the most recent epoch
      • addLossAndCopy

        public LossCurve addLossAndCopy​(double[] values,
                                        List<String> lossNames)
        Return a new LossCurve with the given losses added on as the most recent epoch