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\).
| Constructor and Description |
|---|
L1Loss()
Calculates L1 Loss between the label and prediction, a.k.a.
|
L1Loss(float weight,
int batchAxis)
Calculates L1 Loss between the label and prediction, a.k.a.
|
| Modifier and Type | Method and Description |
|---|---|
NDArray |
getLoss(NDList label,
NDList prediction)
Calculates loss between the label and prediction.
|
duplicate, excludeBatchAxis, getValue, hingeLoss, hingeLoss, l1Loss, l1Loss, l2Loss, l2Loss, reset, sigmoidBinaryCrossEntropyLoss, sigmoidBinaryCrossEntropyLoss, softmaxCrossEntropyLoss, softmaxCrossEntropyLoss, updatecheckLabelShapes, checkLabelShapes, getNamepublic L1Loss(float weight,
int batchAxis)
weight - the weight to apply on loss value, default 1batchAxis - the axis that represents mini-batch, default 0public L1Loss()