From 395c36588de672b1f6f642f65d80087ae0c50052 Mon Sep 17 00:00:00 2001 From: goldmermaid <37914843+goldmermaid@users.noreply.github.com> Date: Tue, 24 Sep 2019 15:59:21 -0700 Subject: [PATCH] Update KL Divergence formula (#16170) * Update KL Divergence formula Errors fix. * remove initial error --- python/mxnet/gluon/loss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/mxnet/gluon/loss.py b/python/mxnet/gluon/loss.py index 45c3dee08139..40fdaa51573e 100644 --- a/python/mxnet/gluon/loss.py +++ b/python/mxnet/gluon/loss.py @@ -424,7 +424,7 @@ class KLDivLoss(Loss): prob = \softmax({pred}) - L = \sum_i {label}_i * \big[\log({label}_i) - log({pred}_i)\big] + L = \sum_i {label}_i * \big[\log({label}_i) - \log({prob}_i)\big] `label` and `pred` can have arbitrary shape as long as they have the same