Package ai.djl.training.loss
Class HingeLoss
- java.lang.Object
-
- ai.djl.training.evaluator.Evaluator
-
- ai.djl.training.loss.Loss
-
- ai.djl.training.loss.HingeLoss
-
-
Field Summary
-
Fields inherited from class ai.djl.training.evaluator.Evaluator
totalInstances
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NDArrayevaluate(NDList label, NDList prediction)Calculates the evaluation between the labels and the predictions.-
Methods inherited from class ai.djl.training.loss.Loss
addAccumulator, elasticNetWeightedDecay, elasticNetWeightedDecay, elasticNetWeightedDecay, elasticNetWeightedDecay, getAccumulator, hingeLoss, hingeLoss, hingeLoss, l1Loss, l1Loss, l1Loss, l1WeightedDecay, l1WeightedDecay, l1WeightedDecay, l2Loss, l2Loss, l2Loss, l2WeightedDecay, l2WeightedDecay, l2WeightedDecay, maskedSoftmaxCrossEntropyLoss, maskedSoftmaxCrossEntropyLoss, maskedSoftmaxCrossEntropyLoss, quantileL1Loss, quantileL1Loss, resetAccumulator, sigmoidBinaryCrossEntropyLoss, sigmoidBinaryCrossEntropyLoss, sigmoidBinaryCrossEntropyLoss, softmaxCrossEntropyLoss, softmaxCrossEntropyLoss, softmaxCrossEntropyLoss, updateAccumulator
-
Methods inherited from class ai.djl.training.evaluator.Evaluator
checkLabelShapes, checkLabelShapes, getName
-
-
-
-
Constructor Detail
-
HingeLoss
public HingeLoss()
Calculates Hinge loss.
-
HingeLoss
public HingeLoss(java.lang.String name)
Calculates Hinge loss.- Parameters:
name- the name of the loss
-
HingeLoss
public HingeLoss(java.lang.String name, int margin, float weight)Calculates Hinge loss.- Parameters:
name- the name of the lossmargin- the margin in hinge loss. Defaults to 1.0weight- the weight to apply on loss value, default 1
-
-