public class CompositeLoss extends Loss
| Constructor and Description |
|---|
CompositeLoss(Loss... components)
Creates a new instance of
CompositeLoss that can combine the given Loss
components. |
| Modifier and Type | Method and Description |
|---|---|
Loss |
duplicate()
Creates and returns a copy of this object.
|
NDArray |
getLoss(NDList label,
NDList prediction)
Calculates loss between the label and prediction.
|
float |
getValue()
Calculates metric values.
|
void |
reset()
Resets metric values.
|
void |
update(NDList labels,
NDList predictions)
Updates the training metrics based on a
NDList of labels and predictions. |
excludeBatchAxis, hingeLoss, hingeLoss, l1Loss, l1Loss, l2Loss, l2Loss, sigmoidBinaryCrossEntropyLoss, sigmoidBinaryCrossEntropyLoss, softmaxCrossEntropyLoss, softmaxCrossEntropyLosscheckLabelShapes, checkLabelShapes, getNamepublic NDArray getLoss(NDList label, NDList prediction)
public Loss duplicate()
public void update(NDList labels, NDList predictions)
NDList of labels and predictions.
This is a synchronized operation. You should only call it at the end of a batch or epoch.