Skip to content

Commit acfff52

Browse files
authored
Revert "[WIP] Update bregman.py : barycenter_sinkhorn function (#195)" (#196)
This reverts commit b2eae39.
1 parent b2eae39 commit acfff52

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ot/bregman.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ def barycenter_sinkhorn(A, M, reg, weights=None, numItermax=1000,
11161116
err = 1
11171117

11181118
UKv = np.dot(K, np.divide(A.T, np.sum(K, axis=0)).T)
1119-
u = (geometricBar(weights, UKv) / UKv.T).T
1119+
u = (geometricMean(UKv) / UKv.T).T
11201120

11211121
while (err > stopThr and cpt < numItermax):
11221122
cpt = cpt + 1

ot/optim.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def solve_linesearch(cost, G, deltaG, Mi, f_val,
136136

137137
def cg(a, b, M, reg, f, df, G0=None, numItermax=200, numItermaxEmd=100000,
138138
stopThr=1e-9, stopThr2=1e-9, verbose=False, log=False, **kwargs):
139-
r"""
139+
"""
140140
Solve the general regularized OT problem with conditional gradient
141141
142142
The function solves the following optimization problem:
@@ -275,7 +275,7 @@ def cost(G):
275275

276276
def gcg(a, b, M, reg1, reg2, f, df, G0=None, numItermax=10,
277277
numInnerItermax=200, stopThr=1e-9, stopThr2=1e-9, verbose=False, log=False):
278-
r"""
278+
"""
279279
Solve the general regularized OT problem with the generalized conditional gradient
280280
281281
The function solves the following optimization problem:
@@ -413,7 +413,7 @@ def cost(G):
413413

414414

415415
def solve_1d_linesearch_quad(a, b, c):
416-
r"""
416+
"""
417417
For any convex or non-convex 1d quadratic function f, solve on [0,1] the following problem:
418418
.. math::
419419
\argmin f(x)=a*x^{2}+b*x+c

0 commit comments

Comments
 (0)