Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

[Docs] fix Tversky equation (#579)

Markus J. Ankenbrandfa4ad32030f1
diff --git a/kornia/losses/tversky.py b/kornia/losses/tversky.py
index 969bd1d82..089a7faa2 100644
--- a/kornia/losses/tversky.py
+++ b/kornia/losses/tversky.py
@@ -61,7 +61,7 @@ class TverskyLoss(nn.Module):
.. math::
\text{S}(P, G, \alpha; \beta) =
- \frac{|PG|}{|PG| + \alpha |P \ G| + \beta |G \ P|}
+ \frac{|PG|}{|PG| + \alpha |P \setminus G| + \beta |G \setminus P|}
where:
- :math:`P` and :math:`G` are the predicted and ground truth binary