public class L2Loss extends Loss
L2 loss is defined by \(L = \frac{1}{2} \sum_i \vert {label}_i - {prediction}_i \vert^2\)
| Constructor and Description |
|---|
L2Loss()
Calculate L2Loss between the label and prediction, a.k.a.
|
L2Loss(float weight,
int batchAxis)
Calculates L2Loss 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 L2Loss(float weight,
int batchAxis)
weight - the weight to apply on loss value, default 1/2batchAxis - the axis that represents mini-batch, default 0public L2Loss()