public class BinaryCrossEntropyLoss extends Object implements LossFunction, Serializable
Constructor and Description |
---|
BinaryCrossEntropyLoss(NeuralNetwork neuralNet) |
Modifier and Type | Method and Description |
---|---|
float[] |
addPatternError(float[] actual,
float[] target)
Calculates error for given actual and target patterns and adds that error to total error.
|
void |
addRegularizationSum(float regSum)
Adds specified regularization sum to total loss.
|
float |
getTotal()
Returns the total error calculated by this loss function.
|
void |
reset()
Resets the total error and pattern counter.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
valueFor
public BinaryCrossEntropyLoss(NeuralNetwork neuralNet)
public float[] addPatternError(float[] actual, float[] target)
addPatternError
in interface LossFunction
actual
- actual output of a neural networktarget
- target output of a neural networkpublic void addRegularizationSum(float regSum)
LossFunction
addRegularizationSum
in interface LossFunction
regSum
- regularization sumpublic float getTotal()
LossFunction
getTotal
in interface LossFunction
public void reset()
LossFunction
reset
in interface LossFunction
Copyright © 2022. All rights reserved.