summaryrefslogtreecommitdiff
path: root/ot
diff options
context:
space:
mode:
authorRémi Flamary <remi.flamary@gmail.com>2016-11-04 10:18:20 +0100
committerRémi Flamary <remi.flamary@gmail.com>2016-11-04 10:18:20 +0100
commit5992b14bedc1d51b10278474aa2f41f4ce822c38 (patch)
treecbc145a8b2d6a50c30d8239212b8c6347861c45e /ot
parent405f352dc562eb17a2d6d7ca17c2ce14b19f2668 (diff)
add demo mapping
Diffstat (limited to 'ot')
-rw-r--r--ot/da.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ot/da.py b/ot/da.py
index ad2f8b5..4e5fda2 100644
--- a/ot/da.py
+++ b/ot/da.py
@@ -203,7 +203,7 @@ def joint_OT_mapping_linear(xs,xt,mu=1,eta=0.001,bias=False,verbose=False,verbos
if it>=numItermax:
loop=0
- if abs(vloss[-1]-vloss[-2])<stopThr:
+ if abs(vloss[-1]-vloss[-2])/abs(vloss[-2])<stopThr:
loop=0
if verbose:
@@ -323,7 +323,7 @@ def joint_OT_mapping_kernel(xs,xt,mu=1,eta=0.001,kerneltype='gaussian',sigma=1,b
if it>=numItermax:
loop=0
- if abs(vloss[-1]-vloss[-2])<stopThr:
+ if abs(vloss[-1]-vloss[-2])/abs(vloss[-2])<stopThr:
loop=0
if verbose: