sxjscience commented on a change in pull request #16170: Update KL Divergence 
formula
URL: https://github.com/apache/incubator-mxnet/pull/16170#discussion_r325908542
 
 

 ##########
 File path: python/mxnet/gluon/loss.py
 ##########
 @@ -408,7 +408,7 @@ class KLDivLoss(Loss):
 
     .. math::
 
-        L = \sum_i {label}_i * \big[\log({label}_i) - {pred}_i\big]
+        L = \sum_i {label}_i * \big[\log({label}_i) - \log({pred}_i)\big]
 
 Review comment:
   We are assuming the the preds are generated by the log-softmax activation.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to