We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea0f36a commit 8bd161bCopy full SHA for 8bd161b
Sources/TensorFlow/Loss.swift
@@ -153,7 +153,8 @@ public func poissonLoss<Scalar: TensorFlowFloatingPoint>(
153
return (predicted - expected * log(predicted)).mean()
154
}
155
156
-/// Returns the Kullback-Leibler divergence between predictions and expectations.
+/// Returns the Kullback-Leibler divergence (KL divergence) between between expectations and predictions.
157
+/// Given two distributions `p` and `q`, KL divergence computes `(p * log(p / q)).sum()`.
158
///
159
/// - Parameters:
160
/// - predicted: Predicted outputs from a neural network.
0 commit comments