Skip to content

Commit f42b487

Browse files
[DOC] Minor suggestions for the Gromov Wasserstein docstring (#737)
* Modified conjugate gradient to conditional gradient * Changed gamma to T for consistency * Update RELEASES.md --------- Co-authored-by: Cédric Vincent-Cuaz <cedvincentcuaz@gmail.com>
1 parent 61e9af4 commit f42b487

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

RELEASES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
- Update doc for default regularization in `ot.unbalanced` sinkhorn solvers (Issue #691, PR #700)
2626
- Clean documentation for `gromov`, `lp` and `unbalanced` folders (PR #710)
2727
- Clean references in documentation (PR #722)
28+
- Clean documentation for `ot.gromov.gromov_wasserstein` (PR #737)
2829

2930
## 0.9.5
3031

ot/gromov/_gw.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ def gromov_wasserstein(
4848
\mathbf{T}^* \in \mathop{\arg \min}_\mathbf{T} \quad \sum_{i,j,k,l}
4949
L(\mathbf{C_1}_{i,k}, \mathbf{C_2}_{j,l}) \mathbf{T}_{i,j} \mathbf{T}_{k,l}
5050
51-
s.t. \ \mathbf{\gamma} \mathbf{1} &= \mathbf{p}
51+
s.t. \ \mathbf{T} \mathbf{1} &= \mathbf{p}
5252
53-
\mathbf{\gamma}^T \mathbf{1} &= \mathbf{q}
53+
\mathbf{T}^T \mathbf{1} &= \mathbf{q}
5454
55-
\mathbf{\gamma} &\geq 0
55+
\mathbf{T} &\geq 0
5656
5757
Where :
5858
@@ -65,7 +65,7 @@ def gromov_wasserstein(
6565
.. note:: This function is backend-compatible and will work on arrays
6666
from all compatible backends. But the algorithm uses the C++ CPU backend
6767
which can lead to copy overhead on GPU arrays.
68-
.. note:: All computations in the conjugate gradient solver are done with
68+
.. note:: All computations in the conditional gradient solver are done with
6969
numpy to limit memory overhead.
7070
.. note:: This function will cast the computed transport plan to the data
7171
type of the provided input :math:`\mathbf{C}_1`. Casting to an integer
@@ -279,11 +279,11 @@ def gromov_wasserstein2(
279279
\mathbf{GW} = \min_\mathbf{T} \quad \sum_{i,j,k,l}
280280
L(\mathbf{C_1}_{i,k}, \mathbf{C_2}_{j,l}) \mathbf{T}_{i,j} \mathbf{T}_{k,l}
281281
282-
s.t. \ \mathbf{\gamma} \mathbf{1} &= \mathbf{p}
282+
s.t. \ \mathbf{T} \mathbf{1} &= \mathbf{p}
283283
284-
\mathbf{\gamma}^T \mathbf{1} &= \mathbf{q}
284+
\mathbf{T}^T \mathbf{1} &= \mathbf{q}
285285
286-
\mathbf{\gamma} &\geq 0
286+
\mathbf{T} &\geq 0
287287
288288
Where :
289289
@@ -300,7 +300,7 @@ def gromov_wasserstein2(
300300
.. note:: This function is backend-compatible and will work on arrays
301301
from all compatible backends. But the algorithm uses the C++ CPU backend
302302
which can lead to copy overhead on GPU arrays.
303-
.. note:: All computations in the conjugate gradient solver are done with
303+
.. note:: All computations in the conditional gradient solver are done with
304304
numpy to limit memory overhead.
305305
.. note:: This function will cast the computed transport plan to the data
306306
type of the provided input :math:`\mathbf{C}_1`. Casting to an integer
@@ -468,7 +468,7 @@ def fused_gromov_wasserstein(
468468
.. note:: This function is backend-compatible and will work on arrays
469469
from all compatible backends. But the algorithm uses the C++ CPU backend
470470
which can lead to copy overhead on GPU arrays.
471-
.. note:: All computations in the conjugate gradient solver are done with
471+
.. note:: All computations in the conditional gradient solver are done with
472472
numpy to limit memory overhead.
473473
.. note:: This function will cast the computed transport plan to the data
474474
type of the provided input :math:`\mathbf{M}`. Casting to an integer
@@ -707,7 +707,7 @@ def fused_gromov_wasserstein2(
707707
.. note:: This function is backend-compatible and will work on arrays
708708
from all compatible backends. But the algorithm uses the C++ CPU backend
709709
which can lead to copy overhead on GPU arrays.
710-
.. note:: All computations in the conjugate gradient solver are done with
710+
.. note:: All computations in the conditional gradient solver are done with
711711
numpy to limit memory overhead.
712712
.. note:: This function will cast the computed transport plan to the data
713713
type of the provided input :math:`\mathbf{M}`. Casting to an integer

0 commit comments

Comments
 (0)