Skip to content

Commit

Permalink
mu.norm does not return ||.||^2!!
Browse files Browse the repository at this point in the history
  • Loading branch information
marcocuturi committed Nov 19, 2024
1 parent ab0139b commit b2d6973
Showing 1 changed file with 1 addition and 2 deletions.
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

0 comments on commit b2d6973

Please sign in to comment.