| Package | Description |
|---|---|
| org.nd4j.autodiff.functions | |
| org.nd4j.autodiff.loss | |
| org.nd4j.autodiff.samediff.ops | |
| org.nd4j.linalg.api.ops.impl.loss | |
| org.nd4j.linalg.api.ops.impl.loss.bp |
| Modifier and Type | Method and Description |
|---|---|
SDVariable |
DifferentialFunctionFactory.lossAbsoluteDifference(SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce) |
SDVariable[] |
DifferentialFunctionFactory.lossAbsoluteDifferenceBP(SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce) |
SDVariable |
DifferentialFunctionFactory.lossCosineDistance(SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce,
int dimension) |
SDVariable[] |
DifferentialFunctionFactory.lossCosineDistanceBp(SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce,
int dimension) |
SDVariable |
DifferentialFunctionFactory.lossHinge(SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce) |
SDVariable[] |
DifferentialFunctionFactory.lossHingeBp(SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce) |
SDVariable |
DifferentialFunctionFactory.lossHuber(SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce,
double delta) |
SDVariable[] |
DifferentialFunctionFactory.lossHuberBp(SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce,
double delta) |
SDVariable |
DifferentialFunctionFactory.lossLog(SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce,
double epsilon) |
SDVariable[] |
DifferentialFunctionFactory.lossLogBp(SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce,
double epsilon) |
SDVariable |
DifferentialFunctionFactory.lossLogPoisson(SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce) |
SDVariable[] |
DifferentialFunctionFactory.lossLogPoissonBp(SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce) |
SDVariable |
DifferentialFunctionFactory.lossLogPoissonFull(SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce) |
SDVariable[] |
DifferentialFunctionFactory.lossLogPoissonFullBp(SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce) |
SDVariable |
DifferentialFunctionFactory.lossMeanPairwiseSquaredError(SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce) |
SDVariable[] |
DifferentialFunctionFactory.lossMeanPairwiseSquaredErrorBp(SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce) |
SDVariable |
DifferentialFunctionFactory.lossMeanSquaredError(SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce) |
SDVariable[] |
DifferentialFunctionFactory.lossMeanSquaredErrorBp(SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce) |
SDVariable |
DifferentialFunctionFactory.lossSigmoidCrossEntropy(SDVariable labels,
SDVariable logits,
SDVariable weights,
LossReduce lossReduce,
double labelSmoothing) |
SDVariable[] |
DifferentialFunctionFactory.lossSigmoidCrossEntropyBp(SDVariable labels,
SDVariable logits,
SDVariable weights,
LossReduce lossReduce,
double labelSmoothing) |
SDVariable |
DifferentialFunctionFactory.lossSoftmaxCrossEntropy(SDVariable labels,
SDVariable logits,
SDVariable weights,
LossReduce lossReduce,
double labelSmoothing) |
SDVariable[] |
DifferentialFunctionFactory.lossSoftmaxCrossEntropyBp(SDVariable labels,
SDVariable logits,
SDVariable weights,
LossReduce lossReduce,
double labelSmoothing) |
| Modifier and Type | Method and Description |
|---|---|
static LossReduce |
LossReduce.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LossReduce[] |
LossReduce.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
| Modifier and Type | Method and Description |
|---|---|
SDVariable |
SDLoss.absoluteDifference(String name,
SDVariable label,
SDVariable predictions,
LossReduce lossReduce)
|
SDVariable |
SDLoss.absoluteDifference(String name,
SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce)
Absolute difference loss: {@code sum_i abs( label[i] - predictions[i] )
|
SDVariable |
SDLoss.cosineDistance(String name,
SDVariable label,
SDVariable predictions,
LossReduce lossReduce,
int dimension)
|
SDVariable |
SDLoss.cosineDistance(String name,
SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce,
int dimension)
Cosine distance loss:
1 - cosineSimilarity(x,y) or 1 - sum_i label[i] * prediction[i], which is
equivalent to cosine distance when both the predictions and labels are normalized.Note: This loss function assumes that both the predictions and labels are normalized to have unit l2 norm. |
SDVariable |
SDLoss.hingeLoss(String name,
SDVariable label,
SDVariable predictions,
LossReduce lossReduce)
|
SDVariable |
SDLoss.hingeLoss(String name,
SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce)
Hinge loss: a loss function used for training classifiers.
|
SDVariable |
SDLoss.huberLoss(String name,
SDVariable label,
SDVariable predictions,
LossReduce lossReduce,
double delta)
|
SDVariable |
SDLoss.huberLoss(String name,
SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce,
double delta)
Huber loss function, used for robust regression.
|
SDVariable |
SDLoss.logLoss(String name,
SDVariable label,
SDVariable predictions,
LossReduce lossReduce)
|
SDVariable |
SDLoss.logLoss(String name,
SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce,
double epsilon)
Log loss, i.e., binary cross entropy loss, usually used for binary multi-label classification.
|
SDVariable |
SDLoss.logPoisson(String name,
SDVariable label,
SDVariable predictions,
LossReduce lossReduce)
|
SDVariable |
SDLoss.logPoisson(String name,
SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce)
Log poisson loss: a loss function used for training classifiers.
|
SDVariable |
SDLoss.logPoissonFull(String name,
SDVariable label,
SDVariable predictions,
LossReduce lossReduce)
|
SDVariable |
SDLoss.logPoissonFull(String name,
SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce)
Log poisson loss: a loss function used for training classifiers.
|
SDVariable |
SDLoss.meanPairwiseSquaredError(String name,
SDVariable label,
SDVariable predictions,
LossReduce lossReduce)
|
SDVariable |
SDLoss.meanPairwiseSquaredError(String name,
SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce)
Mean pairwise squared error.
MPWSE loss calculates the difference between pairs of consecutive elements in the predictions and labels arrays. |
SDVariable |
SDLoss.meanSquaredError(String name,
SDVariable label,
SDVariable predictions,
LossReduce lossReduce)
|
SDVariable |
SDLoss.meanSquaredError(String name,
SDVariable label,
SDVariable predictions,
SDVariable weights,
LossReduce lossReduce)
Mean squared error loss function.
|
SDVariable |
SDLoss.sigmoidCrossEntropy(String name,
SDVariable label,
SDVariable predictions,
LossReduce lossReduce)
|
SDVariable |
SDLoss.sigmoidCrossEntropy(String name,
SDVariable label,
SDVariable predictionLogits,
SDVariable weights,
LossReduce lossReduce,
double labelSmoothing)
Sigmoid cross entropy: applies the sigmoid activation function on the input logits (input "pre-sigmoid preductions")
and implements the binary cross entropy loss function.
|
SDVariable |
SDLoss.softmaxCrossEntropy(String name,
SDVariable label,
SDVariable predictions,
LossReduce lossReduce)
|
SDVariable |
SDLoss.softmaxCrossEntropy(String name,
SDVariable oneHotLabels,
SDVariable logitPredictions,
SDVariable weights,
LossReduce lossReduce,
double labelSmoothing)
Applies the softmax activation function to the input, then implement multi-class cross entropy:
-sum_classes label[i] * log(p[c]) where p = softmax(logits)If NONE is used, returned shape is [numExamples] out for [numExamples, numClasses] predicitons/labels;
otherwise, the output is a scalar. |
| Modifier and Type | Field and Description |
|---|---|
protected LossReduce |
BaseLoss.lossReduce |
| Constructor and Description |
|---|
AbsoluteDifferenceLoss(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable predictions,
SDVariable weights,
SDVariable labels) |
BaseLoss(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable predictions,
SDVariable weights,
SDVariable labels) |
CosineDistanceLoss(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable predictions,
SDVariable weights,
SDVariable labels,
int dimension) |
HingeLoss(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable predictions,
SDVariable weights,
SDVariable labels) |
HuberLoss(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable predictions,
SDVariable weights,
SDVariable labels,
double delta) |
LogLoss(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable predictions,
SDVariable weights,
SDVariable labels,
double epsilon) |
LogPoissonLoss(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable predictions,
SDVariable weights,
SDVariable labels) |
LogPoissonLoss(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable predictions,
SDVariable weights,
SDVariable labels,
boolean full) |
MeanPairwiseSquaredErrorLoss(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable predictions,
SDVariable weights,
SDVariable labels) |
MeanSquaredErrorLoss(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable predictions,
SDVariable weights,
SDVariable labels) |
SigmoidCrossEntropyLoss(SameDiff sameDiff,
LossReduce reductionMode,
SDVariable logits,
SDVariable weights,
SDVariable labels) |
SigmoidCrossEntropyLoss(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable logits,
SDVariable weights,
SDVariable labels,
double labelSmoothing) |
SoftmaxCrossEntropyLoss(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable logits,
SDVariable weights,
SDVariable labels) |
SoftmaxCrossEntropyLoss(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable logits,
SDVariable weights,
SDVariable labels,
double labelSmoothing) |
| Modifier and Type | Field and Description |
|---|---|
protected LossReduce |
BaseLossBp.lossReduce |
| Constructor and Description |
|---|
AbsoluteDifferenceLossBp(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable predictions,
SDVariable weights,
SDVariable labels) |
BaseLossBp(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable predictions,
SDVariable weights,
SDVariable labels) |
CosineDistanceLossBp(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable predictions,
SDVariable weights,
SDVariable labels,
int dimension) |
HingeLossBp(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable predictions,
SDVariable weights,
SDVariable labels) |
HuberLossBp(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable predictions,
SDVariable weights,
SDVariable labels,
double delta) |
LogLossBp(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable predictions,
SDVariable weights,
SDVariable labels,
double epsilon) |
LogPoissonLossBp(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable predictions,
SDVariable weights,
SDVariable labels) |
LogPoissonLossBp(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable predictions,
SDVariable weights,
SDVariable labels,
boolean full) |
MeanPairwiseSquaredErrorLossBp(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable predictions,
SDVariable weights,
SDVariable labels) |
MeanSquaredErrorLossBp(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable predictions,
SDVariable weights,
SDVariable labels) |
SigmoidCrossEntropyLossBp(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable logits,
SDVariable weights,
SDVariable labels,
double labelSmoothing) |
SoftmaxCrossEntropyLossBp(SameDiff sameDiff,
LossReduce lossReduce,
SDVariable logits,
SDVariable weights,
SDVariable labels,
double labelSmoothing) |
Copyright © 2019. All rights reserved.