From 414b25a35cd38bc4e30becffbe27d0e72ed82ecf Mon Sep 17 00:00:00 2001 From: Kazuki Adachi Date: Wed, 17 Apr 2024 22:29:30 +0900 Subject: [PATCH] swap the definitions of p and q --- ignite/metrics/js_divergence.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ignite/metrics/js_divergence.py b/ignite/metrics/js_divergence.py index ffe22191413..1bd37cfedc6 100644 --- a/ignite/metrics/js_divergence.py +++ b/ignite/metrics/js_divergence.py @@ -20,7 +20,7 @@ class JSDivergence(KLDivergence): D_\text{KL}(\mathbf{p}_i \| \mathbf{q}_i) &= \sum_{c=1}^C p_{i,c} \log \frac{p_{i,c}}{q_{i,c}}. \end{align*} - where :math:`\mathbf{p}_i` and :math:`\mathbf{q}_i` are the prediction and ground truth probability tensors, + where :math:`\mathbf{p}_i` and :math:`\mathbf{q}_i` are the ground truth and prediction probability tensors, and :math:`D_\text{KL}` is the KL-divergence. - ``update`` must receive output of the form ``(y_pred, y)``.