-
-
Notifications
You must be signed in to change notification settings - Fork 620
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix error in old PyTorch for KL and JS divergence (#3236)
* add KLDivergence metric * add JSDivergence * fix variable name * update docstring for JSDivergence * Update ignite/metrics/js_divergence.py Co-authored-by: vfdev <vfdev.5@gmail.com> * Update ignite/metrics/kl_divergence.py Co-authored-by: vfdev <vfdev.5@gmail.com> * swap ground truth and prediction * swap the definitions of p and q * fix error in old pytorch * switch to use log_target option by version * check pytorch version in the global space in advance --------- Co-authored-by: vfdev <vfdev.5@gmail.com>
- Loading branch information
Showing
2 changed files
with
33 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters