We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
rng = jax.random.PRNGKey(0) loc = jax.random.uniform(rng,(4,1)) logscale = jnp.array([1.]) pi1 = distrax.MultivariateNormalDiag(loc, jnp.exp(logscale)) def apply_dist(x,logscale): return distrax.MultivariateNormalDiag(x, jnp.exp(logscale)) pi2 = jax.vmap(apply_dist, (0,None))(loc, jnp.exp(logscale)) print(pi1.sample(seed=rng).shape) #(4,1) print(pi2.sample(seed=rng).shape) #(4,4)
The text was updated successfully, but these errors were encountered:
I suppose that the sample inside the vmap function fixes this
Sorry, something went wrong.
But when requiring the entropy of the full distribution, the results are wrong
No branches or pull requests
The text was updated successfully, but these errors were encountered: