diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2020-04-22 16:52:27 +0200 |
---|---|---|
committer | Marc Glisse <marc.glisse@inria.fr> | 2020-04-22 16:52:27 +0200 |
commit | ba17759cf922d246a0a74ac5cf99f67d48a7d8c3 (patch) | |
tree | 0ebc7d092dc1f0221fb3980e2682792841b63f7a | |
parent | 51f7b5bb15f351d08af4c26bd1ffdfe979199976 (diff) |
Clarify the doc of enable_autodiff
-rw-r--r-- | src/python/gudhi/wasserstein/wasserstein.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/python/gudhi/wasserstein/wasserstein.py b/src/python/gudhi/wasserstein/wasserstein.py index 3d1caeb3..0d164eda 100644 --- a/src/python/gudhi/wasserstein/wasserstein.py +++ b/src/python/gudhi/wasserstein/wasserstein.py @@ -100,7 +100,10 @@ def wasserstein_distance(X, Y, matching=False, order=2., internal_p=2., enable_a :param internal_p: Ground metric on the (upper-half) plane (i.e. norm L^p in R^2); Default value is 2 (Euclidean norm). :param enable_autodiff: If X and Y are torch.tensor, tensorflow.Tensor or jax.numpy.ndarray, make the computation - transparent to automatic differentiation. + transparent to automatic differentiation. This requires the package EagerPy. + + .. note:: This considers the function defined on the coordinates of the off-diagonal points of X and Y + and lets the various frameworks compute its gradient. It never pulls new points from the diagonal. :type enable_autodiff: bool :returns: the Wasserstein distance of order q (1 <= q < infinity) between persistence diagrams with respect to the internal_p-norm as ground metric. |