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

add Hungarian solver from optax #598

Merged
merged 10 commits into from
Nov 19, 2024
Prev Previous commit
Next Next commit
mu.norm does not return ||.||^2!!
  • Loading branch information
marcocuturi committed Nov 19, 2024
commit b2d6973007143541f1736efa5d1cef75512f96d6
3 changes: 1 addition & 2 deletions src/ott/geometry/costs.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,7 @@ def __init__(self, p: float):
self.p = p

def h(self, z: jnp.ndarray) -> float: # noqa: D102
# Computed by raising squared-norm to p/2.
return mu.norm(z) ** (self.p / 2.)
return mu.norm(z, ord=2) ** (self.p)

def tree_flatten(self): # noqa: D102
return (), (self.p,)
Expand Down
Loading