-
Notifications
You must be signed in to change notification settings - Fork 246
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
Samples are outside the support for DiscreteUniform distribution #1834
Comments
Thanks @Deathn0t! It is a bug at this line numpyro/numpyro/infer/hmc_gibbs.py Line 283 in f6eb6ce
We should pass in the enumerate support there. Something like
Do you want to try to fix the issue? |
Hi @fehiepsi , thank you for the hint! I will try to look at it today and keep you updated if I am blocked. If I see things working I will open PR. |
Hi @fehiepsi , I had a look at it today. It seems the Gibbs proposal is used instead of the RW: numpyro/numpyro/infer/hmc_gibbs.py Line 219 in f6eb6ce
For simplicity and minimal code changes I was thinking maybe to do the mapping to numpyro/numpyro/infer/mixed_hmc.py Line 304 in f6eb6ce
what do you think? I tried the following and it seems to work: z_discrete = jax.tree.map(
lambda idx, support: support[idx],
z_discrete,
self._support_enumerates,
) |
Hello,
I noticed that samples have value outside the support for
DiscreteUniform
distribution. Here is a simple reproducible example:Which outputs:
I was expecting values of
x
to be in [1,2].Am I using it wrongly or is it a real bug?
Thank you very much for your help.
The text was updated successfully, but these errors were encountered: