public class SingleShotDetectionLoss extends AbstractCompositeLoss
SingleShotDetectionLoss is an implementation of Loss. It is used to compute the
loss while training a Single Shot Detection (SSD) model for object detection. It involves
computing the targets given the generated anchors, labels and predictions, and then computing the
sum of class predictions and bounding box predictions.componentstotalInstances| Constructor and Description |
|---|
SingleShotDetectionLoss()
Base class for metric with abstract update methods.
|
| Modifier and Type | Method and Description |
|---|---|
protected ai.djl.util.Pair<NDList,NDList> |
inputForComponent(int componentIndex,
NDList labels,
NDList predictions)
Calculate loss between label and prediction.
|
addAccumulator, evaluate, getAccumulator, getComponents, resetAccumulator, updateAccumulatorhingeLoss, hingeLoss, hingeLoss, l1Loss, l1Loss, l1Loss, l2Loss, l2Loss, l2Loss, sigmoidBinaryCrossEntropyLoss, sigmoidBinaryCrossEntropyLoss, sigmoidBinaryCrossEntropyLoss, softmaxCrossEntropyLoss, softmaxCrossEntropyLoss, softmaxCrossEntropyLosscheckLabelShapes, checkLabelShapes, getNamepublic SingleShotDetectionLoss()
protected ai.djl.util.Pair<NDList,NDList> inputForComponent(int componentIndex, NDList labels, NDList predictions)
inputForComponent in class AbstractCompositeLosslabels - target labels. Must contain (offsetLabels, masks, classlabels). This is
returned by MultiBoxTarget functionpredictions - predicted labels (class prediction, offset prediction)componentIndex - the index of the component loss