Package ai.djl.training.loss
Class L1Loss
java.lang.Object
ai.djl.training.evaluator.Evaluator
ai.djl.training.loss.Loss
ai.djl.training.loss.L1Loss
L1Loss calculates L1 loss between label and prediction.
L1 loss is defined by \(L = \sum_i \vert {label}_i - {prediction}_i \vert\).
-
Field Summary
Fields inherited from class ai.djl.training.evaluator.Evaluator
totalInstances -
Constructor Summary
Constructors -
Method Summary
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, updateAccumulatorsMethods inherited from class ai.djl.training.evaluator.Evaluator
checkLabelShapes, checkLabelShapes, getName
-
Constructor Details
-
L1Loss
public L1Loss()Calculates L1 Loss between the label and prediction, a.k.a. MAE(Mean Absolute Error). -
L1Loss
Calculates L1 Loss between the label and prediction, a.k.a. MAE(Mean Absolute Error).- Parameters:
name- the name of the loss
-
L1Loss
Calculates L1 Loss between the label and prediction, a.k.a. MAE(Mean Absolute Error).- Parameters:
name- the name of the lossweight- the weight to apply on loss value, default 1
-
-
Method Details