|
2 | 2 |
|
3 | 3 | # Author: Remi Flamary <remi.flamary@unice.fr>
|
4 | 4 | # Kilian Fatras <kilian.fatras@irisa.fr>
|
| 5 | +# Quang Huy Tran <quang-huy.tran@univ-ubs.fr> |
5 | 6 | #
|
6 | 7 | # License: MIT License
|
7 | 8 |
|
@@ -341,19 +342,19 @@ def test_lazy_empirical_sinkhorn():
|
341 | 342 | M = ot.dist(X_s, X_t)
|
342 | 343 | M_m = ot.dist(X_s, X_t, metric='minkowski')
|
343 | 344 |
|
344 |
| - f, g = ot.bregman.empirical_sinkhorn(X_s, X_t, 1, numIterMax=numIterMax, isLazy=True, batchSize=(1, 1)) |
| 345 | + f, g = ot.bregman.empirical_sinkhorn(X_s, X_t, 1, numIterMax=numIterMax, isLazy=True, batchSize=(1, 1), verbose=True) |
345 | 346 | G_sqe = np.exp(f[:, None] + g[None, :] - M / 1)
|
346 | 347 | sinkhorn_sqe = ot.sinkhorn(a, b, M, 1)
|
347 | 348 |
|
348 |
| - f, g, log_es = ot.bregman.empirical_sinkhorn(X_s, X_t, 0.1, log=True, numIterMax=numIterMax, isLazy=True, batchSize=1) |
| 349 | + f, g, log_es = ot.bregman.empirical_sinkhorn(X_s, X_t, 0.1, numIterMax=numIterMax, isLazy=True, batchSize=1, log=True) |
349 | 350 | G_log = np.exp(f[:, None] + g[None, :] - M / 0.1)
|
350 | 351 | sinkhorn_log, log_s = ot.sinkhorn(a, b, M, 0.1, log=True)
|
351 | 352 |
|
352 | 353 | f, g = ot.bregman.empirical_sinkhorn(X_s, X_t, 1, metric='minkowski', numIterMax=numIterMax, isLazy=True, batchSize=1)
|
353 | 354 | G_m = np.exp(f[:, None] + g[None, :] - M_m / 1)
|
354 | 355 | sinkhorn_m = ot.sinkhorn(a, b, M_m, 1)
|
355 | 356 |
|
356 |
| - loss_emp_sinkhorn = ot.bregman.empirical_sinkhorn2(X_s, X_t, 1, numIterMax=numIterMax, isLazy=True, batchSize=1) |
| 357 | + loss_emp_sinkhorn, log = ot.bregman.empirical_sinkhorn2(X_s, X_t, 1, numIterMax=numIterMax, isLazy=True, batchSize=1, log=True) |
357 | 358 | loss_sinkhorn = ot.sinkhorn2(a, b, M, 1)
|
358 | 359 |
|
359 | 360 | # check constratints
|
|
0 commit comments