-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MRG] Bures-Wasserstein Gradient Descent for Bures-Wasserstein Barycenters #680
Merged
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
7eb14d2
bw barycenter with batched sqrtm
clbonet 869955c
BWGD for barycenters
clbonet be985d1
sbwgd for barycenters
clbonet 9a43369
Test fixed_point vs gradient_descent
clbonet 016704b
Merge branch 'master' into bwgd_barycenter
cedricvincentcuaz 8afc00b
fix test bwgd
clbonet b2b0bca
nx exp_bures
clbonet d287a2a
update doc
clbonet 9377405
Merge branch 'master' into bwgd_barycenter
clbonet 4f648bb
fix merge
clbonet b821ee8
doc exp bw
clbonet d22028b
First tests stochastic + exp
clbonet dffa0cf
exp_bures with einsum
clbonet f3e911a
type Id test
clbonet 97f2261
up test stochastic
clbonet 7594393
test weights
clbonet 6c48b3c
Add BW distance with batchs
clbonet ba806ff
step size SGD BW Barycenter
clbonet 7ab365a
Merge branch 'master' into bwgd_barycenter
rflamary 447a1a6
Merge branch 'master' into bwgd_barycenter
rflamary d4045f1
batchable BW distance
clbonet f669a8e
Merge branch 'master' into bwgd_barycenter
cedricvincentcuaz 6c0a2a0
Merge branch 'master' into bwgd_barycenter
rflamary 5da317f
Merge branch 'master' into bwgd_barycenter
cedricvincentcuaz 2b317e2
Merge branch 'master' into bwgd_barycenter
clbonet 50994ed
RELEASES.md
clbonet bad385f
precommit
clbonet 0b20759
Add ot.gaussian.bures
clbonet fe3d9db
Add arg backend
clbonet 506a524
up stop criteria sgd Gaussian barycenter
clbonet c640ecb
Fix release
clbonet 41ebffc
fix doc
clbonet 3a7af81
Merge branch 'master' into bwgd_barycenter
rflamary 3a7effc
change API bw
clbonet f41b093
up test bures_wasserstein_distance
clbonet 0a9d499
up test bures_wasserstein_distance
clbonet 1444648
up test bures_wasserstein_distance
clbonet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1363,7 +1363,7 @@ def solve(self, a, b): | |
return np.linalg.solve(a, b) | ||
|
||
def trace(self, a): | ||
return np.trace(a) | ||
return np.einsum("...ii", a) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is that faster or slower? we need an idea |
||
|
||
def inv(self, a): | ||
return scipy.linalg.inv(a) | ||
|
@@ -1776,7 +1776,7 @@ def solve(self, a, b): | |
return jnp.linalg.solve(a, b) | ||
|
||
def trace(self, a): | ||
return jnp.trace(a) | ||
return jnp.diagonal(a, axis1=-2, axis2=-1).sum(-1) | ||
|
||
def inv(self, a): | ||
return jnp.linalg.inv(a) | ||
|
@@ -2309,7 +2309,7 @@ def solve(self, a, b): | |
return torch.linalg.solve(a, b) | ||
|
||
def trace(self, a): | ||
return torch.trace(a) | ||
return torch.diagonal(a, dim1=-2, dim2=-1).sum(-1) | ||
|
||
def inv(self, a): | ||
return torch.linalg.inv(a) | ||
|
@@ -2723,7 +2723,7 @@ def solve(self, a, b): | |
return cp.linalg.solve(a, b) | ||
|
||
def trace(self, a): | ||
return cp.trace(a) | ||
return cp.trace(a, axis1=-2, axis2=-1) | ||
|
||
def inv(self, a): | ||
return cp.linalg.inv(a) | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont' see that in the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmh, I think I did a mistake when merging with the master at some point. (It was deleted from Line 46 of the Releases.md, and it seemed to be in the wrong releases of POT)