diff options
author | Rémi Flamary <remi.flamary@gmail.com> | 2016-11-04 10:18:20 +0100 |
---|---|---|
committer | Rémi Flamary <remi.flamary@gmail.com> | 2016-11-04 10:18:20 +0100 |
commit | 5992b14bedc1d51b10278474aa2f41f4ce822c38 (patch) | |
tree | cbc145a8b2d6a50c30d8239212b8c6347861c45e /ot | |
parent | 405f352dc562eb17a2d6d7ca17c2ce14b19f2668 (diff) |
add demo mapping
Diffstat (limited to 'ot')
-rw-r--r-- | ot/da.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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: |