public class L1Loss extends Loss
L1Loss calculates L1 loss between label and prediction.
L1 loss is defined by \(L = \sum_i \vert {label}_i - {prediction}_i \vert\).
totalInstances| Constructor and Description |
|---|
L1Loss()
Calculates L1 Loss between the label and prediction, a.k.a.
|
L1Loss(java.lang.String name)
Calculates L1 Loss between the label and prediction, a.k.a.
|
L1Loss(java.lang.String name,
float weight)
Calculates L1 Loss between the label and prediction, a.k.a.
|
| Modifier and Type | Method and Description |
|---|---|
NDArray |
evaluate(NDList label,
NDList prediction)
Calculates the evaluation between the labels and the predictions.
|
addAccumulator, getAccumulator, hingeLoss, hingeLoss, hingeLoss, l1Loss, l1Loss, l1Loss, l2Loss, l2Loss, l2Loss, maskedSoftmaxCrossEntropyLoss, maskedSoftmaxCrossEntropyLoss, maskedSoftmaxCrossEntropyLoss, resetAccumulator, sigmoidBinaryCrossEntropyLoss, sigmoidBinaryCrossEntropyLoss, sigmoidBinaryCrossEntropyLoss, softmaxCrossEntropyLoss, softmaxCrossEntropyLoss, softmaxCrossEntropyLoss, updateAccumulatorcheckLabelShapes, checkLabelShapes, getNamepublic L1Loss()
public L1Loss(java.lang.String name)
name - the name of the losspublic L1Loss(java.lang.String name,
float weight)
name - the name of the lossweight - the weight to apply on loss value, default 1