Skip to content

Commit af5f726

Browse files
author
Kilian Fatras
committed
fixed bug
1 parent 6777ffd commit af5f726

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ot/stochastic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def sag_entropic_transport(a, b, M, reg, numItermax=10000, lr=None):
153153
'''
154154

155155
if lr is None:
156-
lr = 1. / max(a)
156+
lr = 1. / max(a/reg)
157157
n_source = np.shape(M)[0]
158158
n_target = np.shape(M)[1]
159159
cur_beta = np.zeros(n_target)
@@ -238,7 +238,7 @@ def averaged_sgd_entropic_transport(a, b, M, reg, numItermax=300000, lr=None):
238238
'''
239239

240240
if lr is None:
241-
lr = 1. / max(a)
241+
lr = 1. / max(a/reg)
242242
n_source = np.shape(M)[0]
243243
n_target = np.shape(M)[1]
244244
cur_beta = np.zeros(n_target)

0 commit comments

Comments
 (0)