Skip to content
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] Fix bug SSW backend #471

Merged
merged 34 commits into from
May 5, 2023
Merged

[MRG] Fix bug SSW backend #471

merged 34 commits into from
May 5, 2023

Conversation

clbonet
Copy link
Contributor

@clbonet clbonet commented May 3, 2023

Types of changes

  • Use nx.einsum in ot.sliced_wasserstein_sphere and ot.sliced_wasserstein_sphere_unif to project points on the circle
  • Added the possibility to give projections as input of ot.sliced_wasserstein_sphere
  • Added the method matmul in the backend, which use the same API as numpy
  • Added test in test_backend for matmul and in test_sliced to check that ot.sliced_wasserstein_sphere returns the same value when used with the same projections on different backend

Motivation and context / Related issue

The function ot.sliced_wasserstein_sphere did not return the same values given the backend used.

How has this been tested (if it applies)

  • Tests for ot.sliced_wasserstein_sphere have been added to check that it returns the same value when used with different backend but with the same projections
  • Tests for nx.matmul have been added in test_backend to multiply batchs of matrices of the form (1,n,d,d) and (m,1,d,d)

PR checklist

  • I have read the CONTRIBUTING document.
  • The documentation is up-to-date with the changes I made (check build artifacts).
  • All tests passed, and additional code has been covered with new tests.
  • I have added the PR and Issue fix to the RELEASES.md file.

@rflamary rflamary changed the title [WIP] Fix bug SSW backend [MRG] Fix bug SSW backend May 5, 2023
@rflamary rflamary merged commit 7e0ea27 into PythonOT:master May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants