-
Notifications
You must be signed in to change notification settings - Fork 79
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
TI transport map #559
TI transport map #559
Conversation
2c108b1
to
66e1767
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #559 +/- ##
=======================================
Coverage 89.38% 89.39%
=======================================
Files 71 71
Lines 7545 7552 +7
Branches 1075 1075
=======================================
+ Hits 6744 6751 +7
Misses 650 650
Partials 151 151
|
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.
Thansk a lot Michal! a few comments below
tests/geometry/costs_test.py
Outdated
|
||
np.testing.assert_array_equal(jnp.isfinite(h_transform(x)), True) | ||
transport_fn = cost_fn.transport_map(lambda z: -jnp.sum(z * (A.dot(z)))) | ||
transport_fn = jax.jit(transport_fn, static_argnames=["forward"]) |
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 think a good test would be to transport samples, on xs
. get ys
, keep them in that order, and then run the Hungarian algorithm and make sure the optimal permutation with cost h
is identity (could use scipy's https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.linear_sum_assignment.html)
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.
Done, works only with the exception of SqPNorm(1.0)
, changed to SqPNorm(1.05)
.
No description provided.