@@ -16,8 +16,9 @@ def coordinate_grad_semi_dual(b, M, reg, beta, i):
16
16
distributions for (i, :)
17
17
18
18
The function computes the gradient of the semi dual problem:
19
+
19
20
.. math::
20
- \W_varepsilon (a, b) = \max_\v \sum_i (\sum_j v_j * b_j
21
+ \W_ \v arepsilon (a, b) = \max_\v \sum_i (\sum_j v_j * b_j
21
22
- \r eg log(\sum_j exp((v_j - M_{i,j})/reg) * b_j)) * a_i
22
23
23
24
where :
@@ -89,6 +90,7 @@ def sag_entropic_transport(a, b, M, reg, numItermax=10000, lr=None):
89
90
optimal transport max problem
90
91
91
92
The function solves the following optimization problem:
93
+
92
94
.. math::
93
95
\gamma = arg\min_\gamma <\gamma,M>_F + reg\cdot\Omega(\gamma)
94
96
s.t. \gamma 1 = a
@@ -175,6 +177,7 @@ def averaged_sgd_entropic_transport(a, b, M, reg, numItermax=300000, lr=None):
175
177
optimal transport max problem
176
178
177
179
The function solves the following optimization problem:
180
+
178
181
.. math::
179
182
\gamma = arg\min_\gamma <\gamma,M>_F + reg\cdot\Omega(\gamma)
180
183
s.t. \gamma 1 = a
@@ -258,6 +261,7 @@ def c_transform_entropic(b, M, reg, beta):
258
261
259
262
The function computes the c_transform of a dual variable from the other
260
263
dual variable:
264
+
261
265
.. math::
262
266
u = v^{c,reg} = -reg \sum_j exp((v - M)/reg) b_j
263
267
@@ -331,6 +335,7 @@ def solve_semi_dual_entropic(a, b, M, reg, method, numItermax=10000, lr=None,
331
335
measures optimal transport max problem
332
336
333
337
The function solves the following optimization problem:
338
+
334
339
.. math::
335
340
\gamma = arg\min_\gamma <\gamma,M>_F + reg\cdot\Omega(\gamma)
336
341
s.t. \gamma 1 = a
@@ -436,7 +441,8 @@ def batch_grad_dual_alpha(M, reg, alpha, beta, batch_size, batch_alpha,
436
441
Computes the partial gradient of F_\W_varepsilon
437
442
438
443
Compute the partial gradient of the dual problem:
439
- ..Math:
444
+
445
+ ..math:
440
446
\f orall i in batch_alpha,
441
447
grad_alpha_i = 1 * batch_size -
442
448
sum_{j in batch_beta} exp((alpha_i + beta_j - M_{i,j})/reg)
@@ -518,7 +524,8 @@ def batch_grad_dual_beta(M, reg, alpha, beta, batch_size, batch_alpha,
518
524
Computes the partial gradient of F_\W_varepsilon
519
525
520
526
Compute the partial gradient of the dual problem:
521
- ..Math:
527
+
528
+ ..math:
522
529
\f orall j in batch_beta,
523
530
grad_beta_j = 1 * batch_size -
524
531
sum_{i in batch_alpha} exp((alpha_i + beta_j - M_{i,j})/reg)
@@ -602,6 +609,7 @@ def sgd_entropic_regularization(M, reg, batch_size, numItermax, lr,
602
609
optimal transport dual problem
603
610
604
611
The function solves the following optimization problem:
612
+
605
613
.. math::
606
614
\gamma = arg\min_\gamma <\gamma,M>_F + reg\cdot\Omega(\gamma)
607
615
s.t. \gamma 1 = a
@@ -709,6 +717,7 @@ def solve_dual_entropic(a, b, M, reg, batch_size, numItermax=10000, lr=1,
709
717
optimal transport dual problem
710
718
711
719
The function solves the following optimization problem:
720
+
712
721
.. math::
713
722
\gamma = arg\min_\gamma <\gamma,M>_F + reg\cdot\Omega(\gamma)
714
723
s.t. \gamma 1 = a
0 commit comments