Skip to content

Commit

Permalink
small bug entropic fgw
Browse files Browse the repository at this point in the history
  • Loading branch information
rflamary committed Oct 18, 2023
1 parent c90cf8b commit 242c10d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ot/gromov/_bregman.py
Original file line number Diff line number Diff line change
Expand Up @@ -826,10 +826,10 @@ def entropic_fused_gromov_wasserstein2(
logv['T'] = T

lin_term = nx.sum(T * M)
gw_term = (logv['gw_dist'] - (1 - alpha) * lin_term) / alpha
gw_term = (logv['fgw_dist'] - (1 - alpha) * lin_term) / alpha

log_fgw['quad_loss'] = gw_term * alpha
log_fgw['lin_loss'] = lin_term * (1 - alpha)
logv['quad_loss'] = gw_term * alpha
logv['lin_loss'] = lin_term * (1 - alpha)

if log:
return logv['fgw_dist'], logv
Expand Down

0 comments on commit 242c10d

Please sign in to comment.