Package ai.djl.training.loss
Class SigmoidBinaryCrossEntropyLoss
- java.lang.Object
-
- ai.djl.training.evaluator.Evaluator
-
- ai.djl.training.loss.Loss
-
- ai.djl.training.loss.SigmoidBinaryCrossEntropyLoss
-
-
Field Summary
-
Fields inherited from class ai.djl.training.evaluator.Evaluator
totalInstances
-
-
Constructor Summary
Constructors Constructor Description SigmoidBinaryCrossEntropyLoss()
Performs Sigmoid cross-entropy loss for binary classification.SigmoidBinaryCrossEntropyLoss(java.lang.String name)
Performs Sigmoid cross-entropy loss for binary classification.SigmoidBinaryCrossEntropyLoss(java.lang.String name, float weight, boolean fromSigmoid)
Performs Sigmoid cross-entropy loss for binary classification.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NDArray
evaluate(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
-
SigmoidBinaryCrossEntropyLoss
public SigmoidBinaryCrossEntropyLoss()
Performs Sigmoid cross-entropy loss for binary classification.
-
SigmoidBinaryCrossEntropyLoss
public SigmoidBinaryCrossEntropyLoss(java.lang.String name)
Performs Sigmoid cross-entropy loss for binary classification.- Parameters:
name
- the name of the loss
-
SigmoidBinaryCrossEntropyLoss
public SigmoidBinaryCrossEntropyLoss(java.lang.String name, float weight, boolean fromSigmoid)
Performs Sigmoid cross-entropy loss for binary classification.- Parameters:
name
- the name of the lossweight
- the weight to apply on the loss value, default 1fromSigmoid
- whether the input is from the output of sigmoid, default false
-
-