Skip to content

Commit 0b80637

Browse files
committed
log return for sinkhorn
1 parent 4c344cf commit 0b80637

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ot/bregman.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ def sinkhorn(a,b, M, reg, numItermax = 1000, stopThr=1e-9, verbose=False, log=Fa
139139
print('{:5s}|{:12s}'.format('It.','Err')+'\n'+'-'*19)
140140
print('{:5d}|{:8e}|'.format(cpt,err))
141141
cpt = cpt +1
142+
if log:
143+
log['u']=u
144+
log['v']=v
145+
142146
#print 'err=',err,' cpt=',cpt
143147
if log:
144148
return u.reshape((-1,1))*K*v.reshape((1,-1)),log

0 commit comments

Comments
 (0)