Package ai.djl.timeseries.distribution
Class DistributionLoss
java.lang.Object
ai.djl.training.evaluator.Evaluator
ai.djl.training.loss.Loss
ai.djl.timeseries.distribution.DistributionLoss
public class DistributionLoss
extends ai.djl.training.loss.Loss
DistributionLoss
calculates loss for a given distribution.
Distribution Loss is calculated by Distribution.logProb(NDArray)
at label point
-
Field Summary
Fields inherited from class ai.djl.training.evaluator.Evaluator
totalInstances
-
Constructor Summary
ConstructorDescriptionDistributionLoss
(String name, DistributionOutput distrOutput) Calculates Distribution Loss between the label and distribution. -
Method Summary
Modifier and TypeMethodDescriptionai.djl.ndarray.NDArray
evaluate
(ai.djl.ndarray.NDList labels, ai.djl.ndarray.NDList predictions) Methods inherited from class ai.djl.training.loss.Loss
addAccumulator, elasticNetWeightedDecay, elasticNetWeightedDecay, elasticNetWeightedDecay, elasticNetWeightedDecay, getAccumulator, hingeLoss, hingeLoss, hingeLoss, l1Loss, l1Loss, l1Loss, l1WeightedDecay, l1WeightedDecay, l1WeightedDecay, l2Loss, l2Loss, l2Loss, l2WeightedDecay, l2WeightedDecay, l2WeightedDecay, maskedSoftmaxCrossEntropyLoss, maskedSoftmaxCrossEntropyLoss, maskedSoftmaxCrossEntropyLoss, quantileL1Loss, quantileL1Loss, resetAccumulator, sigmoidBinaryCrossEntropyLoss, sigmoidBinaryCrossEntropyLoss, sigmoidBinaryCrossEntropyLoss, softmaxCrossEntropyLoss, softmaxCrossEntropyLoss, softmaxCrossEntropyLoss, updateAccumulator, updateAccumulators
Methods inherited from class ai.djl.training.evaluator.Evaluator
checkLabelShapes, checkLabelShapes, getName
-
Constructor Details
-
DistributionLoss
Calculates Distribution Loss between the label and distribution.- Parameters:
name
- the name of the lossdistrOutput
- theDistributionOutput
to construct the target distribution
-
-
Method Details
-
evaluate
public ai.djl.ndarray.NDArray evaluate(ai.djl.ndarray.NDList labels, ai.djl.ndarray.NDList predictions) - Specified by:
evaluate
in classai.djl.training.evaluator.Evaluator
-