Package ai.djl.training.evaluator
Class SingleShotDetectionAccuracy
- java.lang.Object
-
- ai.djl.training.evaluator.Evaluator
-
- ai.djl.training.evaluator.AbstractAccuracy
-
- ai.djl.training.evaluator.SingleShotDetectionAccuracy
-
public class SingleShotDetectionAccuracy extends AbstractAccuracy
SingleShotDetectionAccuracyis an implementation ofAbstractAccuracy. It is used while training a Single Shot Detection (SSD) model for object detection. It uses the targets computed byMultiBoxTarget, and computes the class prediction accuracy against the computed targets.
-
-
Field Summary
-
Fields inherited from class ai.djl.training.evaluator.AbstractAccuracy
axis, correctInstances
-
Fields inherited from class ai.djl.training.evaluator.Evaluator
totalInstances
-
-
Constructor Summary
Constructors Constructor Description SingleShotDetectionAccuracy(java.lang.String name)Creates a new instance ofSingleShotDetectionAccuracywith the given name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ai.djl.util.Pair<java.lang.Long,NDArray>accuracyHelper(NDList labels, NDList predictions)A helper for classes extendingAbstractAccuracy.-
Methods inherited from class ai.djl.training.evaluator.AbstractAccuracy
addAccumulator, evaluate, getAccumulator, resetAccumulator, updateAccumulator
-
Methods inherited from class ai.djl.training.evaluator.Evaluator
checkLabelShapes, checkLabelShapes, getName
-
-
-
-
Constructor Detail
-
SingleShotDetectionAccuracy
public SingleShotDetectionAccuracy(java.lang.String name)
Creates a new instance ofSingleShotDetectionAccuracywith the given name.- Parameters:
name- the name given to the accuracy
-
-
Method Detail
-
accuracyHelper
protected ai.djl.util.Pair<java.lang.Long,NDArray> accuracyHelper(NDList labels, NDList predictions)
A helper for classes extendingAbstractAccuracy.- Specified by:
accuracyHelperin classAbstractAccuracy- Parameters:
labels- the labels to get accuracy forpredictions- the predictions to get accuracy for- Returns:
- a pair(number of total values, ndarray int of correct values)
-
-