Skip to content

Commit

Permalink
improving new mi knn
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisferreyra13 committed Aug 4, 2024
1 parent dd05885 commit 3e03382
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hoi/core/mi.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def mi_gauss(x: jnp.array, y: jnp.array):
def _cdist(x, y) -> jnp.ndarray:
"""Pairwise squared distances between all samples of x and y."""
diff = x.T[:, None, :] - y.T[None]
_dist = jnp.einsum("ijc->ij", diff**2)
_dist = jnp.sum(diff**2, axis=-1)
return _dist


Expand Down

0 comments on commit 3e03382

Please sign in to comment.