Class LossCurve
- java.lang.Object
-
- org.nd4j.autodiff.listeners.records.LossCurve
-
public class LossCurve extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LossCurve
addLossAndCopy(double[] values, List<String> lossNames)
Return a new LossCurve with the given losses added on as the most recent epochLossCurve
addLossAndCopy(Loss loss)
Return a new LossCurve with the given losses added on as the most recent epochLoss
lastMeanDelta()
Return the loss delta between the last epoch and the one before it.double
lastMeanDelta(String lossName)
Return the loss delta between the last epoch and the one before it, for a given variable.double
lastMeanDelta(SDVariable loss)
Return the loss delta between the last epoch and the one before it, for a given variable.Loss
lastMeanLoss()
Get the mean loss for the last epoch.float
lastMeanLoss(@NonNull String lossName)
Return the mean loss value for a given variable on the last epoch.float
lastMeanLoss(@NonNull SDVariable loss)
Return the mean loss value for a given variable on the last epoch.List<Loss>
losses()
Loss
meanLoss(int epoch)
Get the mean loss for a given epoch If epoch is negative, counts backwards from the end.float[]
meanLoss(@NonNull String lossName)
Return all mean loss values for a given variablefloat
meanLoss(@NonNull String lossName, int epoch)
Return the mean loss value for a given variable on a given epoch.float[]
meanLoss(@NonNull SDVariable loss)
Return all mean loss values for a given variablefloat
meanLoss(@NonNull SDVariable loss, int epoch)
Return the mean loss value for a given variable on a given epoch.
-
-
-
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. SeemeanLoss(int)
-
meanLoss
public float meanLoss(@NonNull @NonNull SDVariable loss, int epoch)
Return the mean loss value for a given variable on a given epoch. SeemeanLoss(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
-
-