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

filter_vmap produces output with wrong out_axes arrangement #900

Closed
remifan opened this issue Nov 24, 2024 · 1 comment · Fixed by #901
Closed

filter_vmap produces output with wrong out_axes arrangement #900

remifan opened this issue Nov 24, 2024 · 1 comment · Fixed by #901

Comments

@remifan
Copy link

remifan commented Nov 24, 2024

def foo(x):
    return x * 2.

x = jnp.arange(24).reshape((2,3,4))
y = jax.vmap(foo, out_axes=-1)(x)
z = eqx.filter_vmap(foo, out_axes=-1)(x)
print("jax:", y.shape, "eqx:", z.shape)
# jax: (3, 4, 2) eqx: (4, 3, 2)

equinox version: 0.11.8

@patrick-kidger
Copy link
Owner

Thank you for the report! I've just fixed this in #901.

This one is important enough that I'm also going to do a new Equinox release with the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants