Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Update KL Divergence formula #16170

Merged
merged 2 commits into from
Sep 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/mxnet/gluon/loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,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
Expand Down