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

Fix/batched non sym cost #518

Merged
merged 12 commits into from
Apr 11, 2024
Merged

Fix/batched non sym cost #518

merged 12 commits into from
Apr 11, 2024

Conversation

michalk8
Copy link
Collaborator

@michalk8 michalk8 commented Apr 10, 2024

Fixes wrong computation for non-symmetric costs. This bug was only present when batch_size was passed in the PointCloud.

@michalk8 michalk8 added the bug Something isn't working label Apr 10, 2024
@michalk8 michalk8 self-assigned this Apr 10, 2024
Copy link
Collaborator

@Algue-Rythme Algue-Rythme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -199,51 +198,39 @@ def apply_lse_kernel( # noqa: D102

def body0(carry, i: int):
f, g, eps, vec = carry
y = jax.lax.dynamic_slice(
self.y, (i * self.batch_size, 0), (self.batch_size, self.y.shape[1])
y, g_ = self._leading_slice(self.y, i), self._leading_slice(g, i)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realise it might be worth using jax.lax.dynamic_slice_in_dim instead of jax.lax.dynamic_slice in self._leading_slice implem

@michalk8 michalk8 merged commit 8503dc2 into main Apr 11, 2024
7 of 12 checks passed
@michalk8 michalk8 deleted the fix/batched-non-sym-cost branch April 11, 2024 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants