From ba17759cf922d246a0a74ac5cf99f67d48a7d8c3 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Wed, 22 Apr 2020 16:52:27 +0200 Subject: Clarify the doc of enable_autodiff --- src/python/gudhi/wasserstein/wasserstein.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/python/gudhi') 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. -- cgit v1.2.3